-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Open
Description
Issue Description
When using OpenRouter model xAI: Grok 4.1 Fast with a response format configured in an agent block, the model fails to comply with the specified response format and generates its own response instead.
Error Messages
-
"file_key" doesn't exist on block "agent". Available fields: model, tokens, content, toolCalls, responseFormat- Note:
file_keyis a field defined in the custom response format specification
- Note:
-
"_responseFormatWarning": "LLM did not adhere to the specified structured response format. Expected valid JSON but received malformed content. Falling back to standard format."
Expected Behavior
The model should:
- Adhere to the specified structured response format provided in the agent block configuration
- Generate output that includes the
file_keyfield as defined in the response format - Return valid JSON matching the schema
Actual Behavior
- The model generates its own response format instead of following the specified structure
- The
file_keyfield specified in the response format is not present in the output - A fallback to standard format occurs due to malformed/non-compliant content
- Error indicates the custom field doesn't exist in the block output
Environment
- Model: xAI: Grok 4.1 Fast (via OpenRouter)
- Block Type: Agent
- Response Format: Custom format with
file_keyfield defined
Reproduction
- Create an agent block with xAI: Grok 4.1 Fast model via OpenRouter
- Configure a custom response format that includes a
file_keyfield - Execute the workflow
- Observe the response format non-compliance warning and missing field error
Additional Context
This appears to be a model-specific issue where Grok 4.1 Fast through OpenRouter may not properly support structured output/response formats, resulting in the model ignoring the schema and generating its own response structure.
Metadata
Metadata
Assignees
Labels
No labels