agent: allow using Agentgateway as a model provider#328
Merged
peterj merged 1 commit intoagentregistry-dev:mainfrom Mar 12, 2026
Merged
agent: allow using Agentgateway as a model provider#328peterj merged 1 commit intoagentregistry-dev:mainfrom
peterj merged 1 commit intoagentregistry-dev:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for using Agentgateway as a model provider in arctl agent init, by generating an ADK Python agent that routes LLM traffic through a gateway base URL and by bumping the kagent-adk versions used by the generated project.
Changes:
- Add
Agentgatewayas a supported--model-provideroption and default its model name similarly to OpenAI. - Introduce separate config fields for kagent-adk container image version and Python package version, and wire them into templates.
- Add Go unit tests that render the Python
agent.pytemplate across providers and perform basic Python syntax validation.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/cli/agent/init.go | Adds Agentgateway provider support, updates help text, and passes kagent-adk version fields into generator config. |
| internal/cli/agent/frameworks/common/base_generator.go | Extends AgentConfig with kagent-adk image + Python package version fields for template rendering. |
| internal/cli/agent/frameworks/adk/python/templates/pyproject.toml.tmpl | Conditionally adds kagent-adk Python dependency when provider is agentgateway. |
| internal/cli/agent/frameworks/adk/python/templates/agent/agent.py.tmpl | Generates BaseOpenAI-based model creation for Agentgateway; keeps LiteLLM for other non-Gemini providers. |
| internal/cli/agent/frameworks/adk/python/templates/Dockerfile.tmpl | Switches the base image tag template variable to .KagentADKImageVersion. |
| internal/cli/agent/frameworks/adk/python/generator_test.go | Adds template rendering tests and optional Python syntax validation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
internal/cli/agent/frameworks/adk/python/templates/agent/agent.py.tmpl
Outdated
Show resolved
Hide resolved
\# Description Enables using Agentgateway as a model provider by leveraging BaseOpenAI from kagent-adk to proxy the LLM traffic to a custom API base URL using the GATEWAY_API_BASE_URL env var. Also adds a unit test to test template rendering and basic contents. \# Change Type ``` /kind new_feature ``` \# Changelog ```release-note Allow using Agentgateway as a model provider with arctl agent init. ``` Signed-off-by: Shashank Ram <[email protected]>
timflannagan
approved these changes
Mar 12, 2026
peterj
approved these changes
Mar 12, 2026
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.
Description
Enables using Agentgateway as a model provider by leveraging BaseOpenAI from kagent-adk to proxy the LLM traffic to a custom API base URL using the GATEWAY_API_BASE_URL env var.
Also adds a unit test to test template rendering and basic contents, and bumps kagent-adk to the latest version.
Change Type
Changelog