Skip to content
This repository was archived by the owner on May 9, 2026. It is now read-only.

feat: agent 0.12.11 (auto-heal cross-provider model orphans)#93

Merged
protosphinx merged 1 commit into
mainfrom
proto/strange-easley-2ddf80
Apr 22, 2026
Merged

feat: agent 0.12.11 (auto-heal cross-provider model orphans)#93
protosphinx merged 1 commit into
mainfrom
proto/strange-easley-2ddf80

Conversation

@protosphinx
Copy link
Copy Markdown
Contributor

Summary

  • Cross-provider model-slug orphans now self-heal. Flipping provider from one service to another (e.g. anthropic → ollama) used to leave the previous provider's model slug in place — so the StatusLine would read ollama/anthropic/claude-opus-4.7 and every heartbeat would explode asking ollama to serve an openrouter-shaped slug.
  • normalizeModelForProvider() in src/config.ts now recognises known openrouter vendor prefixes (anthropic/, openai/, google/, meta-llama/, moonshotai/, deepseek/, mistralai/, minimax/, cohere/, microsoft/, perplexity/, x-ai/, qwen/) plus bare claude-/gpt-/gemini-/o1- families. When the slug clearly belongs to a different provider than the one now selected it resets to that provider's default (claude-opus-4-7/gpt-4o/gemini-2.5-pro/anthropic/claude-opus-4.7/llama3.3). Users can still pick a specific model from the /keys dropdown afterward.
  • saveConfig() also runs this normalisation at write time so the on-disk file never sits in a broken cross-provider state — previously the repair only fired on the next loadConfig.
  • New scripts/smoke-normalize-model.mjs round-trips the fix against a scratch $HOME and sweeps pure-function cases for each provider (23 assertions).

Test plan

  • pnpm run typecheck clean
  • pnpm run build clean
  • node scripts/smoke-normalize-model.mjs — 23/23 assertions pass
  • Real-world repro: seed config.json with {provider: ollama, model: anthropic/claude-opus-4.7}, run krawler status → StatusLine reads ollama / llama3.3, on-disk file rewritten to match

🤖 Generated with Claude Code

@protosphinx protosphinx force-pushed the proto/strange-easley-2ddf80 branch from ee968f8 to 1a0372b Compare April 22, 2026 02:13
@protosphinx protosphinx changed the title feat: agent 0.12.9 (auto-heal cross-provider model orphans) feat: agent 0.12.10 (auto-heal cross-provider model orphans) Apr 22, 2026
Flipping `provider` from one service to another (e.g. anthropic → ollama)
used to leave the previous provider's model slug in place, so the
StatusLine would read `ollama/anthropic/claude-opus-4.7` and every cycle
would explode trying to ask ollama to serve an openrouter-shaped slug.

`normalizeModelForProvider()` now recognises known openrouter vendor
prefixes plus bare claude-/gpt-/gemini-/o1- families, and when the slug
clearly belongs to a different provider than the one now selected it
resets to that provider's default. `saveConfig()` also runs this
normalisation at write time so the on-disk file never sits in a broken
cross-provider state.

New scripts/smoke-normalize-model.mjs round-trips the fix against a
scratch HOME and sweeps the pure-function cases.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@protosphinx protosphinx force-pushed the proto/strange-easley-2ddf80 branch from 1a0372b to 93ebd3a Compare April 22, 2026 02:15
@protosphinx protosphinx changed the title feat: agent 0.12.10 (auto-heal cross-provider model orphans) feat: agent 0.12.11 (auto-heal cross-provider model orphans) Apr 22, 2026
@protosphinx protosphinx merged commit a89560f into main Apr 22, 2026
2 checks passed
@protosphinx protosphinx deleted the proto/strange-easley-2ddf80 branch April 22, 2026 02:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant