Centralize model picker list and surface 10 curated models#13
Merged
Conversation
The hardcoded model lists in each adapter were stale and inconsistent — some agents shipped just the Claude trio while OpenCode shipped 14 models including ones we no longer recommend (Kimi K2.5, GLM 4.7, GPT OSS 120B, Gemini 2.5 variants, etc.). This consolidates everything behind a single PICKER_MODELS array in src/config/models.ts. The curated set is the original 5 (Claude Opus/Sonnet/Haiku 4, GPT 5.5, Gemini 3.1 Pro Preview) plus 5 additions per request (Kimi K2.6, GLM 5.1, MiniMax M2.7, DeepSeek V4 Pro, DeepSeek V4 Flash). All adapters now derive from the same source: Pi, OpenClaw, Claude Desktop, and Codex bake the list into their config; Hermes registers a providers.opper block so its /mode picker shows "Opper (N models)" with discovery against /v1/models (PICKER_MODELS as fallback). Claude Code remains dynamic via the gateway. Also fixes a latent bug where configureOpenCode would skip rewriting provider.opper if it already existed — meaning users on a stale template never got refreshed. Both configure() and spawn() now pass overwrite: true so the latest template lands on every launch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PICKER_MODELSarray insrc/config/models.ts. Pi, OpenClaw, Claude Desktop, and Codex now derive their pickers/profiles from that array — bumping a model is a one-line edit.providers.opperblock so its/modepicker showsOpper (N models)alongside the built-in providers. Discovery is enabled (Hermes hits/v1/modelslike Claude Code does);PICKER_MODELSis the fallback when discovery fails.configureOpenCodewould skip rewritingprovider.opperif it already existed — users on a stale template never got refreshed. Bothconfigure()andspawn()now passoverwrite: true.pickerModelsForLaunch(launchModel)so the launch model is always atmodels[0]for adapters where position-0 is the active default (OpenClaw has no_launchmarker — this was a regression risk).Test plan
npm test(324 passing, +6 new tests for Codex profile generation, Hermesproviders.opperblock, per-spawn URL refresh, Pi/OpenClaw launch-model ordering)npm run buildcleannode dist/index.js launch opencode— picker shows the 10 curated models (Claude trio, GPT 5.5, Gemini 3.1 Pro Preview, Kimi K2.6, GLM 5.1, MiniMax, DeepSeek Pro/Flash)node dist/index.js launch hermesthen/mode— showsOpper (N models)rownode dist/index.js launch codex --profile opper-deepseek-proresolves correctly