Repository navigation
Add the current Claude and GPT-6 models - #64
Closed
alexey-milovidov wants to merge 3 commits into
Closed
alexey-milovidov wants to merge 3 commits into
alexey-milovidov wants to merge 3 commits into
Conversation
Anthropic: - Add `claude-fable-5-2`, `claude-opus-5-5`, `claude-sonnet-5-5`, `claude-haiku-5-5` and `claude-fable-5-1`; the default model is now `claude-sonnet-5-5`. - Omit sampling parameters for `claude-haiku-5-5`, which rejects non-default values; the existing prefixes already cover the point releases of Opus 5, Fable 5 and Sonnet 5. - Map the `refusal` stop reason to `kFinishReasonContentFilter` instead of `kFinishReasonStop`, both in responses and in streams. - Document that the newest models reject a forced tool choice. OpenAI: - Add `gpt-6.2-astra`, `gpt-6.2-sol`, `gpt-6.1-terra` and `gpt-6-luna`. - Treat the GPT-6 family as reasoning-first: omit sampling parameters, and send the lowest accepted `reasoning_effort` (`low`; `none` for `gpt-6-luna` and `gpt-6.1-terra`; GPT-6.2 rejects `none`). - Note the shutdown dates of `gpt-5-mini`, `gpt-5-nano`, `gpt-4.1`, `gpt-4.1-mini` and `gpt-5.4-nano`. - Keep `gpt-5.6` as the default: GPT-6 models support tool calling only through the Responses API, not Chat Completions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
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.
Update the model catalogs to the current Claude and OpenAI models, and adjust the request builders for the new models' parameter rules.
Anthropic:
claude-fable-5-2,claude-opus-5-5,claude-sonnet-5-5,claude-haiku-5-5andclaude-fable-5-1; the default model becomesclaude-sonnet-5-5.temperature/top_pforclaude-haiku-5-5, which rejects non-default values (the existing prefixes already cover the point releases of Opus 5, Fable 5 and Sonnet 5).refusalstop reason (safety classifiers declined, HTTP 200) tokFinishReasonContentFilterinstead ofkFinishReasonStop, in responses and streams.ToolChoice::required()/specific()→ HTTP 400). The request is still sent as is, so the API error surfaces instead of silently changing the tool choice; the forced-tool integration tests stay onclaude-sonnet-5.OpenAI:
gpt-6.2-astra,gpt-6.2-sol,gpt-6.1-terra,gpt-6-luna.reasoning_effort:low, ornoneforgpt-6-lunaandgpt-6.1-terra(GPT-6.2 rejectsnone).gpt-5-mini/gpt-5-nano(2026-12-11),gpt-4.1/gpt-4.1-mini(2027-01-14) andgpt-5.4-nano(2027-04-01).gpt-5.6as the default: GPT-6 models support tool calling only through the Responses API, which the SDK does not speak yet (follow-up for Is support for OpenAI /v1/responses API planned? #44).The non-tool integration tests now exercise
claude-sonnet-5-5,claude-opus-5-5,claude-haiku-5-5,gpt-6.2-solandgpt-6-luna. Includes the formatting fix of #63 foropenai_stream.cpp.Related: #63
🤖 Generated with Claude Code
Note
Medium Risk
Changes request shaping for many models (defaults,
reasoning_effort, sampling omission) and finish-reason semantics; misconfiguration could cause HTTP 400s or different behavior for tool-calling users still on older model constants.Overview
Updates Anthropic and OpenAI model catalogs and aligns request/response handling with each provider’s current API rules.
Anthropic: Adds
claude-fable-5-2,claude-opus-5-5,claude-sonnet-5-5,claude-haiku-5-5, andclaude-fable-5-1, and sets the default toclaude-sonnet-5-5. The request builder now strips sampling params forclaude-haiku-5-5(and existing prefix rules still cover other 5.x point releases).refusalstop reasons map tokFinishReasonContentFilterin both sync responses and streams. Public headers document that Fable 5.1+, Opus 5.5, and Sonnet 5.5 reject forced tool choice.OpenAI: Adds the GPT-6 family (
gpt-6.2-astra,gpt-6.2-sol,gpt-6.1-terra,gpt-6-luna) with notes on Chat Completions limits (no tool calling on GPT-6 via this endpoint) and deprecation/shutdown dates for older models. The default staysgpt-5.6for tool-calling compatibility. GPT-6 gets the same sampling omission as GPT-5, plusreasoning_effortselection (lowfor most GPT-6,nonefor Luna/Terra, omitted for unknown variants like cyber).Examples, README, integration tests, and unit tests are switched to the new defaults and expanded model coverage.
Reviewed by Cursor Bugbot for commit 01b88fa. Bugbot is set up for automated code reviews on this repo. Configure here.