Skip to content

Tweak provider error message #248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Tweak provider error message #248

wants to merge 3 commits into from

Conversation

edenh
Copy link
Contributor

@edenh edenh commented Jun 10, 2025

No description provided.

@edenh edenh requested a review from ankrgyl June 10, 2025 16:11
Copy link

vercel bot commented Jun 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ai-proxy ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 10, 2025 4:11pm

@edenh edenh requested a review from ibolmo June 10, 2025 16:11
@@ -1139,7 +1139,7 @@ async function fetchModelLoop(
headersString.push(`${key}: ${value}`);
});
const errorText =
`AI provider returned ${httpCode} error.\n\nHeaders:\n` +
`The AI provider returned ${httpCode} error. This is likely not an issue with Braintrust, but rather with the model provider.${httpCode === 500 ? " Please check the model provider's status page." : httpCode === 429 ? " Please adjust max concurrency." : ""}\n\nHeaders:\n` +
Copy link
Collaborator

@ibolmo ibolmo Jun 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "please adjust concurrency" is throwing me off. Is that on the Braintrust side (i.e. playground concurrency) or is that like a quota/limit problem in the AI provider?

You may consider just dropping this one and keep the rest. I think most folks know what 429 is.

Would you see us return the statusText and/or response.text() in addition to headers?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm also curious if we shouldn't return a JSON message rather than a plain message. This way we avoid losing fidelity.

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.

3 participants