Don't add the provider's public host to egress when a ModelConfig sets baseUrl

Open Beginner friendly
#3,507 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@lakshyab20 is already working on this.

Since Nov 5, 2026.

  • #3537 by @lakshyab20 — open

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
81/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go

Research direction

Start with adkconfig/builder.go lines 312–318 and compare how Mistral and Ollama handle a configured baseUrl. Update the OpenAI, Anthropic, and Google provider egress logic to match that behavior, then check the relevant tests or add coverage for configured and default URLs. Done means a custom base URL does not add the provider’s public host to egress.

Written by the indexing model from the issue text.

Description

adkconfig/builder.go:312-318 (v1.0.0-rc1) always appends api.openai.com, api.anthropic.com or generativelanguage.googleapis.com to an actor's egress for those providers, even when baseUrl points at an in-cluster proxy (LiteLLM for us). So every actor's allowlist includes a public endpoint it never needs, and we have to block it with a network policy at the egress gateway.

Mistral and Ollama already skip the default when a base URL is set; doing the same for the others would be a small change, and we're happy to PR it.

Dominant language
Go
Stars
4.1k
Forks
871
Avg merge
1d 8h
Merged PRs (30d)
183

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from kagent-dev/kagent

All issues in kagent-dev/kagent

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.