Skip to content

feat: support custom providers in RAG embedding and reranking models#2344

Open
dgageot wants to merge 1 commit intodocker:mainfrom
dgageot:board/docker-agent-issue-1701-implementation-0d8027cc
Open

feat: support custom providers in RAG embedding and reranking models#2344
dgageot wants to merge 1 commit intodocker:mainfrom
dgageot:board/docker-agent-issue-1701-implementation-0d8027cc

Conversation

@dgageot
Copy link
Copy Markdown
Member

@dgageot dgageot commented Apr 7, 2026

Summary

Thread the Providers map from the agent config through RuntimeConfig, ManagersBuildConfig, and BuildContext so that custom provider definitions (e.g. a local Ollama instance with a custom base_url) are applied when creating embedding and reranking model providers.

Changes

  • Add Providers field to RuntimeConfig, ManagersBuildConfig, and BuildContext
  • Add NewProvider helper on both ManagersBuildConfig and BuildContext to encapsulate the repeated provider.New + WithGateway + WithProviders pattern
  • Consolidate duplicate resolveModelConfig logic in builder.go by reusing strategy.ResolveModelConfig
  • Fix missing WithProviders in semantic_embeddings.go chat model creation
  • Fix missing WithGateway in reranking provider creation
  • Add example config demonstrating custom provider usage with RAG

Closes #1701

Thread the Providers map from the agent config through RuntimeConfig,
ManagersBuildConfig, and BuildContext so that custom provider definitions
(e.g. a local Ollama instance with a custom base_url) are applied when
creating embedding and reranking model providers.

Add a NewProvider helper on both ManagersBuildConfig and BuildContext to
encapsulate the repeated provider.New + WithGateway + WithProviders
pattern. Consolidate duplicate resolveModelConfig logic in builder.go
by reusing strategy.ResolveModelConfig.

Also fixes missing WithProviders in semantic_embeddings.go chat model
creation and missing WithGateway in reranking provider creation.

Closes docker#1701

Assisted-By: docker-agent
@dgageot dgageot requested a review from a team as a code owner April 7, 2026 15:12
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.

[RAG] embedding_model should support custom provider

2 participants