Skip to content

Fix TokenRouter GPT-5 OpenCode tool calls#445

Open
ShuxinLin wants to merge 1 commit into
mainfrom
fix/opencode-tokenrouter-gpt5-reasoning
Open

Fix TokenRouter GPT-5 OpenCode tool calls#445
ShuxinLin wants to merge 1 commit into
mainfrom
fix/opencode-tokenrouter-gpt5-reasoning

Conversation

@ShuxinLin

Copy link
Copy Markdown
Collaborator

Summary

  • disable OpenCode reasoning_effort for TokenRouter-hosted OpenAI GPT-5 models so function/MCP tools work on chat/completions
  • surface OpenCode error events as RuntimeError instead of returning an empty trajectory/answer
  • add coverage for tokenrouter/openai/gpt-5.5 and tokenrouter/openai/gpt-5.6-sol

Closes #443

Verification

  • uv run pytest src/agent/opencode_agent/tests/test_runner.py -q
  • uv run opencode-agent --model-id tokenrouter/openai/gpt-5.6-sol --show-trajectory --max-steps 3 "hello"
  • uv run opencode-agent --model-id tokenrouter/openai/gpt-5.5 --show-trajectory "hello"

Signed-off-by: Shuxin Lin <linshuhsin@gmail.com>
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.

gpt-5.6-sol fails in /v1/chat/completions when function tools are used with reasoning_effort

1 participant