Skip to content

fix(ai): devops ai gateway routes/status never send the API key, so an authenticated gateway always looks empty #469

Closed

Description

@dan-petty

Problem

_fetch_remote_routes (src/devops_cli/ai/gateway.py) queries {gateway_url}/model/info, then /models, without an Authorization header. A LiteLLM gateway with a master key answers both with 401. The function returns None and the CLI falls back to the built-in default routes, so devops ai gateway routes (and the ai_gateway_routes MCP tool) show routes that do not exist instead of the gateway's real ones, and say nothing about the failure.

Expected

  • Gateway queries send the configured AI API key (DEVOPS_CLI_AI_API_KEY or the keyring) as a bearer token when one is set.
  • A 401 or 403 is reported as a credentials problem, naming the key's sources, instead of falling back silently to the default routes.

Acceptance criteria

  • devops ai gateway routes lists the live gateway's deployments when the key is set.
  • Without a key, it says the gateway needs one.
  • Tests cover authenticated discovery and the 401 path.

Activity

  1. added this to the v0.2.23 milestone on Sep 23, 2026
  2. added
    type/bug
    scope/ai
    priority/p2-medium
    on Sep 23, 2026
  3. added a commit that references this issue on Sep 24, 2026
    11cb5a2
  4. dan-petty commented on Sep 24, 2026

    @dan-petty
    OwnerAuthor

    Closed by #471, merged into release/v0.2.23.

    GitHub only acts on closing keywords when a pull request merges into the default branch, so this was closed by devops gh issues close-merged.

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

    priority/p2-mediumscope/aitype/bug

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions