Repository navigation
Let a custom API connection send extra request-body fields #1943
Unanswered
tututuhehehe
asked this question in
Feature Requests, Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
One optional free-form JSON object on a connection, shown only for custom base URLs — call it Extra body. Whatever is in it is merged into the top level of the
/chat/completionsbody, verbatim. Empty by default, so every existing connection keeps behaving exactly as it does today.That one field covers each vendor's search switch without Tinycast learning a single one of them:
{"enable_search": true}{"tools": [{"type": "deepseek_web_search"}]}{"plugins": [{"id": "web"}]}Why it belongs in Tinycast
#1703 asked for one fixed switch —
{"type":"web_search"}— and was closed for the right reason: every vendor names that tool differently, so one hard-coded entry helps one person. But the thing underneath it repeats. A custom endpoint has a field Tinycast doesn't know about, and today there is nowhere to put it, so the answer is always "fork it".This is the same shape as declared reasoning levels (#1571): Tinycast doesn't guess what a gateway supports, the reader declares it once, and the app sends what it was told. The field is read in two places,
AIConnectionandAIRequestBody, and saves as an empty object for connections that don't use it.It is also the only design where the app carries no vendor knowledge at all — no probe, no table, nothing to update when a vendor renames a key.
Prior art: Raycast's Custom Providers do exactly this with
additional_parameters, documented as "extra fields added to every/chat/completionsrequest".Not in scope
url_citationannotations still need the decoder work [Feature]: Let a custom API connection declare that it searches the web #1703 described. Worth treating as a second step — without it the model searches and the sources don't render — but not a reason to skip the first.Safety
model,messages, orstream.On the first step
If the maintainers would take only the field itself, I'll take that. It's what unblocks the gateways today; the citation rendering can follow whenever someone wants to do it.
All reactions