Skip to content

agent: allow using Agentgateway as a model provider#328

Merged
peterj merged 1 commit intoagentregistry-dev:mainfrom
shashankram:agw
Mar 12, 2026
Merged

agent: allow using Agentgateway as a model provider#328
peterj merged 1 commit intoagentregistry-dev:mainfrom
shashankram:agw

Conversation

@shashankram
Copy link
Copy Markdown
Collaborator

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

/kind new_feature

Changelog

Allows using Agentgateway as a model provider with arctl agent init.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 Agentgateway as a supported --model-provider option 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.py template 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.

\# 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]>
@peterj peterj added this pull request to the merge queue Mar 12, 2026
Merged via the queue into agentregistry-dev:main with commit c5c62ad Mar 12, 2026
7 checks passed
@shashankram shashankram deleted the agw branch March 12, 2026 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants