anomalyco / anomalyco/opencode
LongCat reasoning toggle falls back to unsupported OpenAI effort variants
@neriousy is already working on this.
Since Sep 8, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- Avg merge
- 7h 2m
- Merged PRs (30d)
- 384
Description
Description
The direct LongCat provider declares binary reasoning in models.dev, but OpenCode's reasoningToggle() only handles Alibaba and Cohere. LongCat falls back to generic effort variants, so requests omit the documented thinking.type toggle. Selecting off cannot explicitly disable thinking.
LongCat expects thinking: {"type":"disabled"} or {"type":"enabled"}, not reasoning_effort. Reference: https://longcat.chat/platform/docs/zh/api/chat
OpenCode version
Current dev at ecbc6ccac85b3e8087b6445e584318419b9e2b34.
Steps to reproduce
- Normalize the models.dev
longcatprovider withProvider.fromModelsDevProvider. - Pass its none/high variant through
ProviderTransform.providerOptionsand the actual@ai-sdk/openai-compatibleclient. - Capture the outgoing JSON:
thinkingis absent for both states.
A regression using SDK request capture reproduces this without a live API key. A small fix is prepared that maps the first-party LongCat toggle to none/high and preserves other SDK/provider behavior.
Operating System
macOS
AI assistance: Codex helped investigate, implement, and test this report's fix.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.