Skip to content

feat(k8s): the LiteLLM gateway routes gemini-3.8-flash with its own API key and public egress on port 443 #3113

Description

@dan-petty

Problem or Motivation

The LiteLLM gateway routes only to Ollama tiers in the cluster. The owner wants gemini-3.8-flash, a hosted model with a 1,048,576-token window, as a gateway model. The gateway has no key for it, its pod may call no host outside the cluster, and no route names the model.

Proposed Solution & Architectural Design

  1. Route: add a model group gemini-3.8-flash to k8s/llm/gateway/config.yaml. It uses gemini/gemini-3.8-flash and api_key: os.environ/GEMINI_API_KEY. It sets max_input_tokens 1048576 and the token costs in model_info, because the gateway reads the local cost map only. No existing pool or fallback changes, so no request reaches Google unless a caller names this model.
  2. Key: the credential gemini.api_key (keyring, set by a person with devops config set) goes to the key gemini-api-key of the Secret llm-gateway-secrets through devops k8s push-secrets. The Deployment reads it as GEMINI_API_KEY. The entry is optional, so the gateway starts without it.
  3. Egress: the gateway NetworkPolicy admits TCP 443 to public addresses only (private ranges excluded), with the same shape as the other policies that call the internet.
  4. Docs: the model, the credential and the data rule (a prompt to this group leaves the cluster) in k8s/README.md and SECURITY.md.
  5. Verify: tests for the route, the secret entry, the Deployment env and the egress rule; one command after the rollout that calls the model through the gateway.

Target Subsystem

k8s/llm/gateway, src/devops_cli/k8s/cluster_secrets.py, src/devops_cli/config/env.py, k8s/README.md, SECURITY.md.

Existing Tool Considered

LiteLLM already supports Gemini (gemini/ provider). No new tool. Cost to build: about 40k tokens and 2 hours. Cost to keep: one model entry, one secret entry and one egress rule. Running cost: Google bills per token (introductory price reported as 0.75 USD input and 3.75 USD output per million tokens; confirm on Google's page).

Activity

  1. added
    source/agent
    type/feature
    scope/k8s
    status/new
    value/medium
    effort/low
    on Nov 1, 2026
  2. dan-petty commented on Nov 1, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/k8s. The (k8s) scope of the title gives the scope.
    • Priority: P2-Medium. The owner requests a new model route; it is useful but not blocking or time-critical.
    • Value: Medium. It gives users a 1M-token hosted model through the gateway, expanding capability without replacing existing tiers.
    • Effort: Low. The body states about 40k tokens and 2 hours: one config entry, one secret, one NetworkPolicy, and docs.
    • Related: feat(ai): llm gateway tuning render and apply configuration with rollback #478, which asks for a different change. Both touch gateway model configuration, but #478 automates rendering and applying config, while this candidate adds one specific hosted model entry, a secret, and an egress rule.
  3. added
    priority/p2-medium
    status/in-progress
    and removed
    status/new
    on Nov 1, 2026
  4. removed
    status/in-progress
    on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/k8ssource/agenttype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions