Downgrade model fallback log from warning to debug#8773
Merged
Light2Dark merged 1 commit intomainfrom Mar 19, 2026
Merged
Conversation
When custom providers fall back to OpenAIChatModel due to an unrecognized model name, it's not an error condition — the UI works fine. Downgrading to debug level prevents noisy console warnings for expected behavior. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reduces console noise in the server-side AI provider integration by downgrading the “model not found → fallback to OpenAIChatModel” log from WARNING to DEBUG when a custom provider’s model name isn’t recognized by pydantic-ai’s model registry.
Changes:
- Change the fallback log level from
warningtodebugforinfer_model(...)UserErrorcases. - Clarify the log message to indicate the fallback is due to pydantic-ai model registry lookup.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mscolnick
approved these changes
Mar 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Summary
Issue from Discord. It's quite common to have a custom provider which isn't in pydantic AI's registry. The UI works and we shouldn't log a warning.
📋 Checklist