feat(cli-tools): configure Grok Build subagent models

Add separate model selectors for Grok Build main, general-purpose,
explore, and plan agents. Each override gets an independent 9Router
custom-model slot and context_window derived from 9Router model
capabilities. Preserve and restore pre-existing config on reset.
This commit is contained in:
rixzkiye
2026-07-19 13:35:38 +07:00
parent 0513bf393f
commit e0ba667450
7 changed files with 679 additions and 337 deletions
+10 -1
View File
@@ -19,12 +19,21 @@ export async function GET() {
})
.map((m) => {
const fullModel = `${m.provider}/${m.model}`;
const providerAlias = getProviderAlias(m.provider) || m.provider;
const routedModel = `${providerAlias}/${m.model}`;
const c = getCapabilitiesForModel(m.provider, m.model);
return {
...m,
fullModel,
routedModel,
alias: modelAliases[fullModel] || m.model,
caps: { vision: c.vision, search: c.search, reasoning: c.reasoning },
caps: {
vision: c.vision,
search: c.search,
reasoning: c.reasoning,
contextWindow: c.contextWindow,
maxOutput: c.maxOutput,
},
};
});