Skip to content

Conversation

@pocketarc
Copy link
Contributor

OpenRouter can sometimes return responses without id or model fields in the response body. The handlers passed these values directly to Meta::__construct() without defaults, causing a TypeError when they were null.

Before

TypeError: Prism\Prism\ValueObjects\Meta::__construct(): Argument #1 ($id) must be of type string, null given

After

The response is handled, with id defaulting to an empty string and model falling back to the requested model from the original request.

@pocketarc pocketarc force-pushed the feature/openrouter-error-meta branch from 0f137db to 1106b2d Compare January 13, 2026 17:58
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