Skip to content

Add the current Claude and GPT-6 models - #64

Closed
alexey-milovidov wants to merge 3 commits into
mainfrom
update-models-2026-11
Closed

alexey-milovidov wants to merge 3 commits into
mainfrom
update-models-2026-11

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Update the model catalogs to the current Claude and OpenAI models, and adjust the request builders for the new models' parameter rules.

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 becomes claude-sonnet-5-5.
  • Omit temperature/top_p 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 (safety classifiers declined, HTTP 200) to kFinishReasonContentFilter instead of kFinishReasonStop, in responses and streams.
  • Document that Fable 5.1+, Opus 5.5 and Sonnet 5.5 reject a forced tool choice (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 on claude-sonnet-5.

OpenAI:

  • Add gpt-6.2-astra, gpt-6.2-sol, gpt-6.1-terra, gpt-6-luna.
  • Treat GPT-6 as reasoning-first on Chat Completions: omit sampling parameters (per OpenAI's migration guide) and send the lowest accepted reasoning_effort: low, or none for gpt-6-luna and gpt-6.1-terra (GPT-6.2 rejects none).
  • Note the announced shutdown dates of gpt-5-mini/gpt-5-nano (2026-12-11), gpt-4.1/gpt-4.1-mini (2027-01-14) and gpt-5.4-nano (2027-04-01).
  • Keep gpt-5.6 as 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-sol and gpt-6-luna. Includes the formatting fix of #63 for openai_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, and claude-fable-5-1, and sets the default to claude-sonnet-5-5. The request builder now strips sampling params for claude-haiku-5-5 (and existing prefix rules still cover other 5.x point releases). refusal stop reasons map to kFinishReasonContentFilter in 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 stays gpt-5.6 for tool-calling compatibility. GPT-6 gets the same sampling omission as GPT-5, plus reasoning_effort selection (low for most GPT-6, none for 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.

alexey-milovidov and others added 3 commits November 27, 2026 00:30
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>
@alexey-milovidov

Copy link
Copy Markdown
Member Author

All changes of this PR are already in main: #67 was built on this branch and was squash-merged with these commits (after merging main, the branch has no diff against it). Closing as superseded.

Related: #67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant