fix(models): preserve GPT-5.6 variant capabilities - #35
Conversation
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(models): preserve GPT-5.6 variant capabilities This is item 1/1 in the current shard. Shard 0/1. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a9e0d31827
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let suffixSeparator = modelComponent.firstIndex(of: ":"), | ||
| modelComponent.index(after: suffixSeparator) < modelComponent.endIndex | ||
| { | ||
| modelComponent[..<suffixSeparator] |
There was a problem hiding this comment.
Restrict route-suffix stripping to OpenRouter variants
This strips any non-empty colon suffix before capability detection, but gpt56Model(for:) is also used by OpenAICompatibleProvider and TogetherProvider, where a colon can be part of an arbitrary model tag rather than OpenRouter routing metadata. In those contexts an ID such as gpt-5.6-sol:4k is now classified as the full GPT-5.6 Sol model and gets 372K context / 128K output capabilities instead of the safe defaults, which can make clients send requests the backend cannot handle. Please limit this stripping to known OpenRouter route suffixes or OpenRouter-specific code paths.
Useful? React with 👍 / 👎.
|
Exact-head proof for
|
Summary
:online,:nitro,:floor, and:exactoTesting
swift test --filter 'ModelParsingTests|OpenAICompatibleHelperTests'(51 tests)TACHIKOMA_DISABLE_API_TESTS=true TACHIKOMA_TEST_MODE=mock swift test --no-parallel(797 tests)mint run nicklockwood/SwiftFormat@0.61.1 swiftformat --lint .swiftlint lint --reporter xcode --strict --quiet