Skip to content

fix: improve reasoning_effort compatibility + Mimo v2 thinking support - #410

Open
spock-wen wants to merge 9 commits into
kittors:devfrom
spock-wen:fix/reasoning-effort-compat
Open

fix: improve reasoning_effort compatibility + Mimo v2 thinking support#410
spock-wen wants to merge 9 commits into
kittors:devfrom
spock-wen:fix/reasoning-effort-compat

Conversation

@spock-wen

Copy link
Copy Markdown

Summary

Two related improvements plus the Mimo v2 thinking feature accumulated on this branch:

1. reasoning_effort compatibility for adaptive / disabled thinking

  • adaptive: use high instead of xhigh for widest provider compatibility. Mimo only accepts low/medium/high. Models that support xhigh will still get it via ApplyThinking normalization.
  • disabled: omit reasoning_effort field entirely instead of setting none. DeepSeek API rejects none (expects high/low/medium/max/xhigh only). Let ApplyThinking handle the per-model compatible value.

2. Empty tool_use/function.name guard

Skip tool calls with empty function.name at all conversion points (also submitted separately as PR #409).

3. Mimo v2 thinking support

  • Add Mimo-v2-flash model
  • Upgrade Mimo-v2-pro with thinking and vision support
  • Add integration tests for Mimo v2 thinking conversion paths

4. CI

  • Add Windows runner for go vet, test, build alongside the existing Ubuntu job
  • Expand CI triggers to push on main/dev branches and weekly schedule

Commits

  • 50819a4 fix: guard against empty tool_use/function.name in protocol conversion
  • d914e1d fix: improve reasoning_effort compatibility for adaptive and disabled thinking
  • f262a74 docs: correct reasoning_effort comments to match ApplyThinking pipeline behavior
  • 15ba231 Merge branch 'fix/empty-tool-name-guard' into fix/reasoning-effort-compat
  • ff4dce0 docs: correct disabled comment — ApplyThinking reads thinking block, not reasoning_effort, when toFormat is Claude
  • e42e8af ci: add windows runner for go vet, test, build alongside existing ubuntu job
  • 37ce71c ci: expand triggers to push on main/dev and weekly schedule
  • 0fb6097 feat: add Mimo-v2-flash and upgrade Mimo-v2-pro with thinking and vision support
  • 5740c0e test: add Mimo v2 thinking integration tests

Files Changed

  • .github/workflows/pr-test-build.yml (+32, -8)
  • internal/registry/model_definitions_static_data.go (+24, -6)
  • internal/runtime/executor/opencode_go_executor.go (+1)
  • internal/translator/openai/claude/openai_claude_request.go (+12, -7)
  • internal/translator/openai/claude/openai_claude_response.go (+16, -4)
  • test/thinking_conversion_test.go (+120)

Test Plan

  • go test ./test/... passes locally
  • New Mimo v2 thinking integration tests cover adaptive→high, budget→level, disabled→omit, and passthrough paths

falsebeetle added 9 commits June 10, 2026 11:06
Skip tool calls with empty function.name at all conversion points:
- Streaming response: check name.String() != "" (not just Exists)
- Non-streaming response: skip in convertOpenAINonStreamingToAnthropic
- Non-streaming alternative: skip in ConvertOpenAIResponseToClaudeNonStream
  (both content-array and message-level tool_calls paths)
- Request back-conversion: skip tool_use with empty name

Upstream providers occasionally return tool_calls with empty function.name
which causes downstream JSON with empty names that Claude Code rejects.
… thinking

- adaptive: use "high" instead of "xhigh" for widest provider compatibility.
  Mimo only accepts low/medium/high. Models that support xhigh will still
  get it via ApplyThinking normalization.
- disabled: omit reasoning_effort field entirely instead of setting "none".
  DeepSeek API rejects "none" (expects high/low/medium/max/xhigh only).
  Let ApplyThinking handle the per-model compatible value.
…not reasoning_effort, when toFormat is Claude
…ion support

- Updated mimo-v2-pro with Thinking(Levels: low/medium/high), context, and native vision
- Added new mimo-v2-flash (youtu-tldr) with thinking support
- Both models use the OpenAI Chat Completions path via opencode-go executor
- clampLevel handles downgrade when xhigh is requested (only low/medium/high supported)
- TestThinking_MimoV2: Claude→OpenAI pipeline (adaptive→high, budget→level, disabled→omit, passthrough)
- TestThinking_MimoV2_OpenAIReasoningEffort: OpenAI format level validation (high/medium/low accepted, xhigh→high clamped)
- Added Mimo test models (low/medium/high only, and no-thinking) to getTestModels()
- xhigh clamping test uses Claude→OpenAI path (production flow where allowClampUnsupported=true)
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