Skip to content

Conversation

@pocketarc
Copy link
Contributor

When structured decoding fails, the exception message was unhelpful; it would show just "Received: " with nothing after it.

By catching the exception in the OpenRouter handler (where we still have access to the raw API response) and re-throwing with context, we can now see exactly what the provider returned.

Before

Structured object could not be decoded. Received:

After

Structured object could not be decoded. Received:
Model: anthropic/claude-3.5-sonnet
Finish reason: stop
Raw choices: [{"message": {"content": null, "role": "assistant"}}]

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