Files
oh-my-opencode-free-fork/src/hooks
hqone 6fbc5ba582 fix: preserve custom provider prefixes in think mode model switching (#451)
When using custom providers with model ID prefixes (e.g., vertex_ai/claude-sonnet-4-5),
the think mode switcher was stripping the prefix when mapping to high variants,
causing routing failures in custom LLM proxies.

Changes:
- Add extractModelPrefix() to parse and preserve prefixes like vertex_ai/, openai/, etc.
- Update getHighVariant() to preserve prefix when mapping to -high variants
- Update isAlreadyHighVariant() to check base model name (without prefix)
- Update getThinkingConfig() to check capability using base model name
- Add comprehensive tests for custom provider prefix scenarios

This fix ensures backward compatibility while supporting custom providers
that use prefixed model IDs for routing.

Fixes issue where think mode would break custom providers with prefixed models
by stripping the routing prefix during model variant switching.
2026-01-03 23:21:44 +09:00
..
2025-12-29 02:29:46 +09:00