Skip to content

[Bug]: Grok 4.1 Fast 'reasoning.encrypted' data format causing Provider returned error in v3.2.4 #1588

@slowtokki0409

Description

@slowtokki0409

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

  1. Configure an agent with "model": "x-ai/grok-4.1-fast" in oh-my-opencode.json.
  2. Attempt to chat with the agent.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions