3cfbc19b05270cd569f86ee6ca4d4ea3408d5ea2
3
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
7880a00ac6 |
models: a model of a key's provider can be asked on System One
axelburks on Discord: a relay serves its decision model under a name of its own (an Ark endpoint id). A key's provider with a System One URL beside a conversation URL can set a model's API to decide (System One in Model settings' API row, its chip's right-click, or `magpie model api <pid/model> decide`). The model is then a decision model there: asked on System One by its own name, offered to routing groups, kept out of the conversation models, and a turn for it is refused with 400 before the vendor is asked. Auto gives it back. A provider with no System One URL, with that URL alone, an account, a remote magpie and Vertex refuse it, saying why. Chat routing (apisAmong) ignores decide. Broken by hand: removing the decideSet check in DecidesModel turns TestModelSetToSystemOneIsADecisionModel and TestModelSetToSystemOneAskedThere red. Run, on this stack over origin/main |
||
|
|
7a6211d047 |
providers: a model's own headers, in Model settings
axelburks on Discord: a vendor routes one model by a header of its own. A key's provider (built-in or custom) can give each model headers (settings.ModelHeaders["pid/model"]). They go on that provider's requests for that model alone, after the provider's headers and after auth: a name both have is sent once, as the model's, so a user's value is never overridden by the provider's or magpie's key header. The gateway names the model (provider.WithModel) on every route that asks one: chat on each API, translated and streamed, count_tokens, System One's decision, embeddings, images, videos and the model test. A fallback provider serving the same model id gets its own headers only. Accounts and plugins carry their sign-in's headers and take none. The editor's "Name, price and reasoning level" panel is now "Model settings" (every language), with + Add header per model, staged and made with the Save; Restore default takes them away. The rows being typed are kept out of the draft's compare, so an untouched editor still closes without asking. Broken by hand: dropping WithModel from gateway.go turns TestModelHeadersReachTheirModelOnEveryRoute red; dropping the provider id check in modelOf turns TestModelHeadersStayWithTheirProvider red. Run, on this stack over origin/main |
||
|
|
234903cb23 |
cli: magpie model api sets the API a model is asked on, as the editor's picker does (yew_fence_931206)
A relay with many models behind one key can now have each model's API
set from a script, not only in the provider editor's Names, prices &
levels ("API this model is asked on"):
magpie model api <provider/model>... chat|responses|anthropic|gemini|auto
magpie model api <provider/model>... --reset (auto)
magpie model api <provider/model> what it is asked on
magpie model apis [<provider>] the settings; with a
provider, every model
It saves through provider.SetModelPrefs, the editor's Save, into
settings' modelAPIs, so a running gateway reads it on the next request
and the agents' model lists are told once. Choices are those the editor
offers (modelAPIs in app.js): the APIs the provider has a URL for, when
it has two or more; Vertex AI none. --help anywhere prints the usage. A
flag in place of a model, an unknown API, a model the provider doesn't
list, or an API it has no URL for is refused; several models are all
checked before any is written. A saved setting for a model the vendor
no longer lists can still be reset. Documented in docs/reference.md
("The API a model is asked on") and the gateway-routing page.
Run (mote, via mote-run, at this tree on
|