Skip to content

Comments

Decode error responses for OpenRouter#166

Open
grundmanise wants to merge 1 commit intojamesrochabrun:mainfrom
grundmanise:patch-1
Open

Decode error responses for OpenRouter#166
grundmanise wants to merge 1 commit intojamesrochabrun:mainfrom
grundmanise:patch-1

Conversation

@grundmanise
Copy link

Some OpenAI-compatible providers (e.g., OpenRouter) provide literal response status codes in the "code" field (e.g., 403). To support these non-compatible error codes, we will now attempt to decode "code" first as an Int, then fall back to a String.

@grundmanise
Copy link
Author

Hi @jamesrochabrun – could you please review this PR once you have a moment?

@grundmanise
Copy link
Author

@jamesrochabrun is this something we want to keep?

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