agents: a model through magpie tells Pi, Crush, omp and Codex how much it holds, and a provider added, edited or removed reaches the model lists agents keep in files of their own — the catalog carried no context window, so Pi took every model through magpie for a 128K one (a CLIProxyAPI's gpt-5.5 holds 922K) and Crush for a 200K one; each model now carries models.dev's input limit, else its context, looked up by bare id as most of the providers serving it give it (a proxy's "openai/gpt-5.4", "gpt-5.4(high)", "glm-4.6:free" find it too; a group holds the least of its members'). And those lists were written only when a model was picked: Codex's magpie-models.json, Pi's models.json, OpenCode's, Crush's, Command Code's, omp's and Hermes' provider blocks and dsh's llm-deepseek entry kept the catalog as it was then, so a provider added later never showed. Saving a provider, a vendor's list fetched anew or models.dev synced now rewrites each one magpie wrote, where it differs, and the app does once at start-up; a Codex signed in to ChatGPT, which asks the gateway, kept its cached list under the backend's ETag, which a change of magpie's never changed — the ETag (and a reply's X-Models-Etag) now carries a tag of magpie's models, and a cache from before a change is aged so the next Codex asks again
This commit is contained in:
@@ -34,6 +34,9 @@ func commandCode(home string) *Agent {
|
||||
ID: "commandcode", Name: "Command Code", Icon: "commandcode", Aliases: []string{"command-code", "cmd"},
|
||||
UA: []string{"command-code", "commandcode"},
|
||||
Bin: "command-code", Dir: dir, Path: path,
|
||||
Sync: func() error {
|
||||
return syncJSON(providers, "provider."+magpieID, func() any { return ccProviderJSON() })
|
||||
},
|
||||
Notice: func() string {
|
||||
notes := []string{"Command Code wants its own sign-in (cmd login) even for models through magpie."}
|
||||
if Running(`(^|/)(cmd|cmdc|command-code|commandcode)( |$)`) {
|
||||
|
||||
Reference in New Issue
Block a user