Skip to content

fix(desktop): let Goose agents use OpenAI-compatible provider URLs - #6641

Open
BradGroux wants to merge 1 commit into
block:mainfrom
BradGroux:agent/goose-custom-provider
Open

BradGroux wants to merge 1 commit into
block:mainfrom
BradGroux:agent/goose-custom-provider

Conversation

@BradGroux

Copy link
Copy Markdown
Contributor

Note: This is a replacement for PR #2905, which was accidentally closed when branches were force-pushed after a commit identity rewrite. The changes are identical, rebased onto the latest main.

Addresses the Buzz-to-Goose runtime boundary in #2749. The structured base-URL UI remains in #3798.

What was happening

Goose already supports OpenAI-compatible providers when they are configured in Goose itself. The broken path is narrower: Buzz-managed Goose configuration can launch goose acp with a legacy endpoint URL in GOOSE_PROVIDER, or keep Buzz's canonical OPENAI_COMPAT_* values separate from the runtime variables Goose reads. That makes otherwise valid Buzz settings fail before or during model discovery.

What changes

  • Keep this PR focused on the Buzz-to-Goose runtime boundary; it no longer changes Buzz Agent configuration or provider UI.
  • Map openai-compat and valid legacy HTTP(S) provider values to GOOSE_PROVIDER=openai.
  • Mirror the canonical key and base URL into current Goose variables (GOOSE_PROVIDER__API_KEY and GOOSE_PROVIDER__HOST) and the supported OpenAI aliases (OPENAI_API_KEY, OPENAI_HOST, and OPENAI_BASE_URL).
  • Normalize aliases inside each configuration layer before merging, so global, persona, and agent precedence stays consistent regardless of which spelling is used.
  • Apply the same effective mapping to readiness, saved and unsaved model discovery, spawn, and spawn hashing.
  • Reject credential-bearing, query-bearing, fragment-bearing, or invalid HTTP(S) endpoint values before persistence.

#3798 remains the owner of structured OpenAI-compatible Base URL UI. This PR does not duplicate that work.

Verification

Verified on exact head bbf31271ea22cddebcead0bde60457818b13a580, rebased onto current main at b1b283cd4c7f926e12eeee8ae1f38c7471922b16:

  • Desktop static checks, formatting, and file-size ratchet passed.
  • Full Desktop JavaScript suite passed: 3,885 tests, 0 failures.
  • Desktop production build passed.
  • Tauri cargo check passed.
  • Full Tauri suite passed: 2,063 library tests and 3 mixer diagnostics, 0 failures, 14 ignored keychain/relay tests.
  • Strict Tauri Clippy passed with warnings denied.

No third-party credential or live remote endpoint was used. The regression coverage verifies the effective environment and discovery inputs Buzz produces for Goose; it does not claim packaged-GUI or Windows validation.

Scope

This changes only OpenAI-compatible provider translation for Goose. It does not change Buzz Agent provider behavior, add a dependency, or add overlapping configuration UI.

@BradGroux

Copy link
Copy Markdown
Contributor Author

This is a replacement for #2905, which was accidentally closed when branches were force-pushed after a commit identity rewrite. Prior review comments and feedback are preserved on the old PR:

#2905

@BradGroux
BradGroux force-pushed the agent/goose-custom-provider branch from 6685e15 to e6d9168 Compare August 25, 2026 19:16
@BradGroux

Copy link
Copy Markdown
Contributor Author

Rebased onto the latest main (was 36 commits behind). The branch applied cleanly. Goose agent provider mapping for OpenAI-compatible URLs is not present on current main, so this fix is still needed.

No review comments on this PR. CI will verify the build and test gate.

@BradGroux
BradGroux force-pushed the agent/goose-custom-provider branch from e6d9168 to 25cd8d6 Compare August 29, 2026 16:15
@github-actions

github-actions Bot commented Aug 29, 2026

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

The current range is 213092074c269bee90c87163672f9c2b8d714cfe...99b997c5dd6c5700852ebcb890d828e91a037f30.
A new review must complete for this exact range. When manual authorization
is required, a Block organization member must comment exactly
@buzz-security-review 99b997c5dd6c5700852ebcb890d828e91a037f30 to authorize a new review.
Any previous review applies only to its recorded range.

@BradGroux

Copy link
Copy Markdown
Contributor Author

Rebased onto the latest main (was 62 commits behind at f249710, now at 00e61ea). The branch applies cleanly with all tests passing.

Still-needed assessment: No upstream commits in the 62-commit window address the same issue. This PR remains needed.

Review requests: buzz-oss-team review request is active from the previous pass.

@BradGroux
BradGroux force-pushed the agent/goose-custom-provider branch from 25cd8d6 to 739857f Compare September 2, 2026 17:30
@BradGroux

Copy link
Copy Markdown
Contributor Author

Rebased onto current block:main (2af9773d6) — 38 new commits since the last rebase pass (Aug 29, 00e61eafa).

Conflict resolved: desktop/src/features/agents/AGENTS.md — Upstream renumbered the Databricks model discovery rule from #16 to #17 and added a "Channel-only runtime controls" section with CLI cancel instructions. This PR's rule #15 ("Provider translation belongs to runtime metadata") was kept as #15, the upstream's Databricks rule kept as #16 (with the upstream's updated text including the Global Defaults display-label clause), and the Channel-only runtime controls section preserved verbatim from upstream.

Still needed: Upstream #7135 (humanize Databricks goose model names) adds display labels for goose model IDs but does not add provider URL translation for OpenAI-compatible endpoints. The PR remains relevant.

Verification:

  • Branch is 0 commits behind block:main, mergeable on GitHub
  • All commits authored as Brad Groux (3053586+BradGroux noreply)
  • DCO signoff preserved on all commits

@BradGroux
BradGroux force-pushed the agent/goose-custom-provider branch from 739857f to 41f8cd7 Compare September 3, 2026 17:36
@BradGroux

Copy link
Copy Markdown
Contributor Author

Rebase and review — 2026-09-03

Base commit: 752cbfc03 (latest main)
Mergeable: Yes
Conflict resolution: Three conflicts resolved:

  • agents.rs imports — merged HEAD's new imports (bestie_assignment, managed_agents_base_dir) with PR's (discover_provider_candidates, managed_agent_avatar_url, provider_deploy, validate_provider_value).
  • runtime.rs — kept both HEAD's setup_payload module and PR's provider_env module.
  • AGENTS.md — merged both rule sections.

Accuracy review: Goose agents still cannot use OpenAI-compatible provider URLs.
Continued relevance: Still needed.

@BradGroux
BradGroux force-pushed the agent/goose-custom-provider branch from 41f8cd7 to adf498c Compare September 3, 2026 17:46
@BradGroux

Copy link
Copy Markdown
Contributor Author

Rebase and review update — Sep 3, 2026

Rebased onto latest main (88687876f). No conflicts.

Accuracy review: Main's Goose config bridge reads GOOSE_PROVIDER and GOOSE_MODEL but does not map OpenAI-compatible settings (custom provider URLs) into the Goose runtime configuration. Users who want to point Goose at an OpenAI-compatible endpoint cannot do so through the Desktop managed-agent UI. The PR's fix to map OpenAI-compatible settings into Goose is still needed.

Mergeable status: Confirmed MERGEABLE on GitHub after force-push.

@BradGroux

Copy link
Copy Markdown
Contributor Author

Rebase pass — Sep 5, 2025

Rebased onto current upstream main (f038cbbb0). Main moved 62 commits since the Sep 2 rebase pass (2af9773d6).

Rebase result

Conflict resolved in desktop/src-tauri/src/commands/agents.rs (import list — upstream added bestie_assignment imports, PR added discover_provider_candidates/provider_deploy/validate_provider_value; merged both) and desktop/src-tauri/src/managed_agents/runtime.rs (upstream added setup_payload module, PR added provider_env module; kept both).

Still-needed assessment

Checked all 62 new main commits for overlap with this PR's topic. None obsoleted:

Verification

  • PR confirmed MERGEABLE on GitHub
  • All commits authored as Brad Groux (3053586+BradGroux noreply)
  • DCO signoff preserved on all commits
  • Review requests to buzz-oss-team still active from the Aug 24 recovery pass

@BradGroux

BradGroux commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Restoration note — Sep 16, 2026: The original text of this comment was accidentally overwritten when the Sep 16 rebase pass posted its follow-up with an edit flag instead of as a new comment. What follows is a faithful reconstruction from the session record; the byte-exact original remains in this comment's GitHub edit history (hover the edited marker on this comment).

Rebase pass — Sep 9, 2026

Rebased onto current upstream main (c045321a7). Main moved 8 commits since the Sep 5 rebase pass (f038cbbb0).

Rebase result

Conflict resolved in desktop/src/features/agents/AGENTS.md — upstream #7358 updated rule #17 (Databricks model discovery) with GPT-5+ Responses routing. PR adds rule #15 (provider translation). Resolution kept the PR's rule #15 and upstream's updated content as rule #16 (renumbered from #17).

Still-needed assessment

Checked all 8 new main commits for overlap with this PR's topic. None obsoleted. #7358 (route GPT-5+ FQNs to Responses) adds Databricks UC routing and #6189 (mesh-llm upgrade) changes Cargo.lock and mesh files — neither adds Goose provider URL translation.

Verification

  • PR confirmed MERGEABLE on GitHub
  • All commits authored as Brad Groux (3053586+BradGroux noreply)
  • DCO signoff preserved on all commits
  • Review requests to buzz-oss-team still active from the Aug 24 recovery pass

Co-authored-by: Brad Groux <bradgroux@hotmail.com>
Signed-off-by: Brad Groux <bradgroux@hotmail.com>
Signed-off-by: Brad Groux <3053586+BradGroux@users.noreply.github.com>
@BradGroux
BradGroux force-pushed the agent/goose-custom-provider branch from e9ed85a to 99b997c Compare September 16, 2026 18:09
@BradGroux

Copy link
Copy Markdown
Contributor Author

Rebase pass — Sep 16, 2026

Rebased onto current upstream main (213092074). Main moved 37 commits since the Sep 9 rebase pass (c045321a7).

Rebase result

Rebased cleanly onto current main. No conflicts this pass — upstream's AGENTS.md rule additions and the provider-translation rule now coexist without textual overlap.

Still-needed assessment

#7594 (pi agent setup guide hints) and #7606 (workspace-scoped Databricks reuse) touch ACP setup surfaces but neither adds provider URL translation for Goose.

Verification

  • PR confirmed MERGEABLE on GitHub
  • All commits authored as Brad Groux (3053586+BradGroux noreply)
  • DCO signoff preserved on all commits
  • buzz-oss-team review request still active

What was not done

No local test suites were run. The rebase only repositions commits; conflict resolutions carry the same logical changes forward (CI will verify builds).

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