Skip to content

Support GPT-5.6 tool calls in Daisen - #464

Merged
syifan merged 2 commits into
mainfrom
codex/fix-gpt56-tool-calling
Aug 5, 2026
Merged

Support GPT-5.6 tool calls in Daisen#464
syifan merged 2 commits into
mainfrom
codex/fix-gpt56-tool-calling

Conversation

@syifan

@syifan syifan commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • send reasoning_effort: "none" on GPT-5.6 Chat Completions turns that offer function tools
  • recognize provider-prefixed, tagged, snapshot, and fine-tuned GPT-5.6 model IDs
  • surface the provider error when Daisen's compatibility fallback retries a turn without tools
  • make gpt-5.6-sol the OpenAI preset and new-configuration default while preserving saved user selections
  • add focused backend/frontend regression tests and document the compatibility behavior

Root cause

OpenAI's /v1/chat/completions endpoint returns HTTP 400 when GPT-5.6 function tools are combined with the model's default reasoning effort:

Function tools with reasoning_effort are not supported ... use /v1/responses or set reasoning_effort to 'none'.

Daisen then exercised its capability fallback and retried without tools, which made GPT-5.6 appear to answer normally while never invoking a tool. GPT-5.5 did not reject the original request.

Daisen currently standardizes on the OpenAI-compatible Chat Completions protocol, so this PR applies the endpoint-recommended reasoning_effort: "none" setting only to GPT-5.6 tool turns. Supporting GPT-5.6 reasoning and tools together would require a future Responses API provider implementation.

The no-tools capability fallback remains for OpenAI-compatible gateways, but it is no longer silent: the chat now reports the rejected tool request and provider error before retrying.

Validation

  • go test ./daisen2/...
  • npm test in daisen2/static — 55 passed
  • npm run build in daisen2/static
  • live synthetic API comparison:
    • GPT-5.5: tool call succeeds unchanged
    • GPT-5.6 Luna/Sol/Terra: all reject the old payload and all call the tool with reasoning_effort: "none"
  • browser verification against the supplied page-migration trace:
    • GPT-5.6 Sol made one data_query call and returned synthetic value 42
    • GPT-5.5 made one data_query call and returned synthetic value 43
    • a fresh configuration selects gpt-5.6-sol in the OpenAI settings panel
    • no browser console errors
    • no trace-table data was sent to the external model

Fixes #463

@syifan
syifan marked this pull request as ready for review August 5, 2026 02:05
@syifan
syifan enabled auto-merge (squash) August 5, 2026 02:05
@syifan
syifan merged commit 96b0b16 into main Aug 5, 2026
6 checks passed
@syifan
syifan deleted the codex/fix-gpt56-tool-calling branch August 5, 2026 12:16
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.

Support GPT-5.6 tool calling in Daisen Bot

1 participant