feat(agent): pluggable LLM provider (openai / gemini)#264
Open
nghiadaulau wants to merge 1 commit into
Open
Conversation
Add agent.ai.provider — "openai" (default) or "gemini" — instead of a raw base_url. ProviderBaseURL maps the provider to its OpenAI-compatible chat endpoint internally (both backends are OpenAI-compatible, so only the base URL changes), so operators pick a short name instead of a long URL. Wired through detect + analyze (per-task agent.ai.analyze.provider override), config.yaml (env AGENT_AI_PROVIDER) and the Helm chart. Empty = openai, so existing deployments are unchanged. Supersedes VersusControl#245 (base_url). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
5 tasks
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.
What
Replaces the verbose
agent.ai.base_url(#245) with a friendlyagent.ai.providerenum —openai(default) orgemini— so operators pick a short name instead of a long URL.config.ProviderBaseURL(provider)maps the provider to its OpenAI-compatible chat-completions endpoint internally (both backends are OpenAI-compatible, so only the base URL changes). Wired through detect + analyze (with a per-taskagent.ai.analyze.provideroverride),config.yaml(envAGENT_AI_PROVIDER), and the Helm chart. Empty =openai, so existing deployments are unchanged.Why
base_urlmeant pasting a long endpoint (https://generativelanguage.googleapis.com/v1beta/openai). A provider name is shorter, less error-prone and self-documenting; adding a backend is onecaseinProviderBaseURL.Supersedes #245
Same goal (bring-your-own LLM / Gemini), cleaner surface — closing #245 in favour of this.
Verified
go test ./pkg/config/...— provider→endpoint map + per-task override.helm lintclean;helm template --set agent.ai.provider=geminirendersprovider: "gemini"with nobase_url.ProviderBaseURL), which ran the full detect → Gemini → Telegram loop on minikube.🤖 Generated with Claude Code