Description
When using x-ai/grok-4.1-fast (via OpenRouter) as an agent model in oh-my-opencode v3.2.4, the model fails to return a response and throws a "Provider returned error".
Root Cause Analysis
- Direct API Test: A direct
curl call to OpenRouter with x-ai/grok-4.1-fast works perfectly (response received in < 3s).
- In-App Failure: In the
oh-my-opencode interface, it fails immediately.
- Specific Observation: Grok 4.1 Fast returns reasoning data in an encrypted format (
"type":"reasoning.encrypted"). The new reasoning/thinking display engine in v3.2.4 likely fails to parse this specific format, leading to a crash or connection termination before the content is streamed.
Steps to Reproduce
- Configure an agent with
"model": "x-ai/grok-4.1-fast" in oh-my-opencode.json.
- Attempt to chat with the agent.
- Observe "Provider returned error" while the model is attempting to "think".
Environment
- Version: v3.2.4
- Provider: OpenRouter
- Model: x-ai/grok-4.1-fast
Expected Behavior
The system should either handle/ignore the reasoning.encrypted block or simply stream the content part once reasoning is completed.