fix(buzz-agent): honor OPENAI_BASE_URL as fallback for base URL - #3705
Open
Chukwuebuka-2003 wants to merge 1 commit into
Open
fix(buzz-agent): honor OPENAI_BASE_URL as fallback for base URL#3705Chukwuebuka-2003 wants to merge 1 commit into
Chukwuebuka-2003 wants to merge 1 commit into
Conversation
The OpenAI provider's base URL resolution only checked OPENAI_COMPAT_BASE_URL, ignoring the more commonly expected OPENAI_BASE_URL env var. This meant users setting a custom base URL via the desktop persona env vars (which uses OPENAI_BASE_URL) would have it silently ignored, with the agent always falling back to api.openai.com. Now checks OPENAI_BASE_URL first, falls back to OPENAI_COMPAT_BASE_URL for backward compatibility, then defaults to https://api.openai.com/v1. Fixes block#3630 Signed-off-by: Chukwuebuka-2003 <ebulamicheal@gmail.com> (cherry picked from commit 953c430)
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
When
BUZZ_AGENT_PROVIDERis set to an OpenAI-compatible provider butOPENAI_COMPAT_BASE_URLis not explicitly set, the agent should fall back to the value ofOPENAI_BASE_URLbefore using the defaulthttps://api.openai.com/v1. This matches user expectations when migrating from other tools that useOPENAI_BASE_URLas the standard env var.Fixes #3630
Changes
config.rs, thefrom_env()OpenAI base URL resolution now checksOPENAI_BASE_URLas a fallback whenOPENAI_COMPAT_BASE_URLis unset, before falling through tohttps://api.openai.com/v1.Testing
Existing tests pass — this is a pure backward-compatible fallback addition.