Skip to content

fix(buzz-agent): honor OPENAI_BASE_URL as fallback for base URL - #3705

Open
Chukwuebuka-2003 wants to merge 1 commit into
block:mainfrom
Chukwuebuka-2003:fix/openai-base-url-fallback
Open

fix(buzz-agent): honor OPENAI_BASE_URL as fallback for base URL#3705
Chukwuebuka-2003 wants to merge 1 commit into
block:mainfrom
Chukwuebuka-2003:fix/openai-base-url-fallback

Conversation

@Chukwuebuka-2003

@Chukwuebuka-2003 Chukwuebuka-2003 commented Jul 30, 2026

Copy link
Copy Markdown

Summary

When BUZZ_AGENT_PROVIDER is set to an OpenAI-compatible provider but OPENAI_COMPAT_BASE_URL is not explicitly set, the agent should fall back to the value of OPENAI_BASE_URL before using the default https://api.openai.com/v1. This matches user expectations when migrating from other tools that use OPENAI_BASE_URL as the standard env var.

Fixes #3630

Changes

  • In config.rs, the from_env() OpenAI base URL resolution now checks OPENAI_BASE_URL as a fallback when OPENAI_COMPAT_BASE_URL is unset, before falling through to https://api.openai.com/v1.

Testing

Existing tests pass — this is a pure backward-compatible fallback addition.

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)
@Chukwuebuka-2003
Chukwuebuka-2003 requested a review from a team as a code owner July 30, 2026 07:22
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.

buzz-agent ignores custom OPENAI_BASE_URL from Agent defaults, always calls api.openai.com

1 participant