Skip to content

refactor: centralize providers in an embedded catalog - #4755

Merged
rumpl merged 1 commit into
docker:mainfrom
rumpl:refactor/embedded-provider-catalog
Oct 28, 2026
Merged

rumpl merged 1 commit into
docker:mainfrom
rumpl:refactor/embedded-provider-catalog

Conversation

@rumpl

@rumpl rumpl commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Replace hard-coded core-provider and alias tables with one ordered, embedded JSON catalog. Each provider declares its API type, endpoint, token environment variables, default model, and compatibility metadata.
  • Drive API selection, message merging, headers, token alternatives, and provider discovery from catalog metadata; keep DMR and Bedrock endpoint resolution in their API implementations.
  • Remove alias lookup APIs and update callers to use the catalog. Consolidate provider tests around shared behavior and add regression coverage for endpoint resolution and gateway rebuilds.
  • Make evaluation-container environment forwarding strictly opt-in through -e NAME or -e NAME=VALUE; remove automatic credential forwarding and catalog forwarding policy, and update the documentation.

@rumpl
rumpl requested a review from a team as a code owner October 28, 2026 19:06
@rumpl

rumpl commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

Things that we should look at at some point:

  • openai_vendor: true, I don't like it, would be nicer to just have api_type: openai and api_type: openai-compatible
  • merge_consecutive_messages, it's just insane that we have this, I wish I had tokens for all of these providers so that I can test it for real

dgageot
dgageot previously approved these changes Oct 28, 2026
@rumpl
rumpl force-pushed the refactor/embedded-provider-catalog branch from faf7fd1 to 471b931 Compare October 28, 2026 19:24
@aheritier aheritier added area/config For configuration parsing, YAML, environment variables area/docs Documentation changes area/models LLM model integrations and model providers area/providers For features/issues/fixes related to LLM providers (Bedrock, LiteLLM, Qwen, custom, etc.) area/runtime Runtime engine, agent loop execution, tool dispatch, loop detection kind/refactor PR refactors code without behavior change labels Oct 28, 2026
@rumpl
rumpl enabled auto-merge October 28, 2026 19:40

@aheritier aheritier left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reviewed all 51 changed files against the catalog consolidation, provider compatibility, native endpoint resolution, gateway rebuild, and explicit-only evaluation environment forwarding requirements in the PR description. See inline comments.

CI / merge status: Verified the current head. Required gate passed; Linux and Windows tests, lint, cross-compilation, and the other executed checks succeeded. Race tests were skipped. The PR is not draft and has no merge conflicts, but GitHub reports mergeable_state=blocked. It is not ready to merge. No local tests were run because the available worktree differs from the PR head.

Issue context: No acceptance-criteria issue or Jira reference is linked from the PR description, commits, or discussion. Historical references #2471, #3145, and #3344 in the touched source were reviewed with their accessible comments, along with related #2327 and #2475. Their header and message-merging requirements were checked against the implementation. Needs-decision: confirm whether the PR description is the complete acceptance scope; no additional requirements were inferred.

Comment thread pkg/config/gather.go Resolved
Comment thread pkg/model/provider/defaults.go Resolved
Comment thread pkg/model/provider/factory.go Resolved
@rumpl
rumpl force-pushed the refactor/embedded-provider-catalog branch from 471b931 to 306a0b8 Compare October 28, 2026 21:03
@rumpl

rumpl commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

Addressed all four blocking review comments in the amended, signed commit 306a0b8, with individual replies and regression tests. The PR description and discussion are the intended acceptance scope; API classification and message-merging redesign remain follow-ups in #4756 and #4757. Validation: fresh lint, build, affected native tests, E2E tests, and the full test-wasm-js suite (isolated HOME) pass. Full native task test still reproduces the previously documented A2A, ACP, and TUI failures.

@rumpl
rumpl added this pull request to the merge queue Oct 28, 2026
Merged via the queue into docker:main with commit 9ced286 Oct 28, 2026
22 checks passed
@rumpl
rumpl deleted the refactor/embedded-provider-catalog branch October 28, 2026 22:32
TDnorthgarden added a commit to TDnorthgarden/docker-agent that referenced this pull request Nov 2, 2026
The provider catalog fills an omitted Google base_url before the SDK can
resolve GOOGLE_GEMINI_BASE_URL, bypassing environment-configured proxies.
The Vertex workaround also clears an explicit catalog endpoint, letting
environment settings override user configuration.

Defer native Google's omitted endpoint to the SDK and pass explicit URLs
unchanged. Cover the configuration contract with the real catalog entry,
and guard Gemini/Vertex request and clone fixtures for local reviewers.

Validation: configuration-only reproducer and regression test fail before
the fix and pass after it; focused endpoint/gateway tests and task dev pass.
Gemini/Vertex HTTP fixtures remain disabled in default validation.

Refs docker#4755

Signed-off-by: Aucoto Zhang <[email protected]>
@aheritier

Copy link
Copy Markdown
Collaborator

Ohhhh

Make evaluation-container environment forwarding strictly opt-in through -e NAME or -e NAME=VALUE; remove automatic credential forwarding and catalog forwarding policy, and update the documentation.

it broke my local evals system which was using some environment variables. I still think it's a good change but I highlighted it in our release notes https://github.com/docker/docker-agent/releases/tag/v1.155.0

FYI @rumpl @dgageot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/config For configuration parsing, YAML, environment variables area/docs Documentation changes area/models LLM model integrations and model providers area/providers For features/issues/fixes related to LLM providers (Bedrock, LiteLLM, Qwen, custom, etc.) area/runtime Runtime engine, agent loop execution, tool dispatch, loop detection kind/refactor PR refactors code without behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants