Skip to content

test(ai): verify the gateway spend row of one agent run #6232

Open

Description

@devops-cli-service

Split from #5437.

The live check needs a deployed gateway and a person. The code change can merge before this check. Problem: The issue asks for one live gateway spend row of a stage round with the run id in its session field. No offline test can show the spend log of the deployed gateway. Why deferred: The check waits on a gateway deployment and a person to read the LiteLLM spend log. Acceptance criteria: A person runs one stage round after the change is deployed. The LiteLLM spend log shows one row whose session field holds the run id of that stage round. The row shows no key value.

Proposed design

Problem statement

The item verifies the LiteLLM spend log of the deployed gateway for one stage round. The log must show one row whose session field equals the run id, and the row must show no key value. No offline test can show the log of the deployed gateway. A person runs one stage round after deployment and reads the log.

Acceptance criteria

Requirement: Pending a person after the merge

The LiteLLM spend log of the deployed gateway MUST show exactly one row for a stage round whose session field equals the run id, and the row MUST show no key value.

Scenario: Live spend row of one stage round

  • WHEN A person runs one stage round after the gateway holds the change of feat(ai): send one run id to the gateway for each agent run #5437, reads the LiteLLM spend log for the run id of that round, and posts the run id and the row's session field to this issue.
  • THEN The log shows exactly one row whose session field equals the run id of that round. The row shows no key value.

Existing Tool Considered

No alternatives check has run. LiteLLM (BerriAI/litellm) is the open, maintained gateway that writes the spend log and its session field. It lacks an offline test of a deployed log, so a person reads the live row. The item adds no code and keeps no code, so the build cost is zero.

Key questions

  • How does the person read the spend row of the stage round?: The person reads the spend log that the LiteLLM gateway serves, from its proxy page or its spend-log endpoint. The item builds no command that queries the log. (best practice) [sources: AGENTS.md]
    • Chosen: Read the spend log of the LiteLLM gateway. The gateway writes and serves the spend log. The item adds no code to keep.
    • Rejected: Build a devops command that queries the LiteLLM spend API. It builds and keeps code that the gateway already serves (AGENTS.md rule 3).
  • Where does the check keep its evidence?: The person posts the run id and the row's session field in a comment on this issue. The person posts no other field of the row. (best practice) [sources: AGENTS.md]
    • Chosen: Comment on the issue with the run id and the session field. AGENTS.md rule 10 keeps private data out of the repository. A full row can hold an internal host or an address.
    • Rejected: Commit the row as a file in the repository. The row is runtime data of a deployment, and rule 10 keeps private data out of the repository.

Fit

Fits in one pull request.

Suspected block

A deployment of the LiteLLM gateway that holds the session-field change of #5437.

Dependencies

None.

Activity

  1. added
    type/test
    on Nov 17, 2026
  2. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    ContributorAuthor
  3. added
    scope/ai
    source/agent
    status/new
    value/medium
    effort/low
    priority/p2-medium
    on Nov 17, 2026
  4. devops-cli-service commented on Nov 19, 2026

    @devops-cli-service
    ContributorAuthor

    Refine cannot set this item to Ready at 4624bc7 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.

  5. devops-cli-service commented on Nov 27, 2026

    @devops-cli-service
    ContributorAuthor

    Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.

  6. devops-cli-service commented on Nov 29, 2026

    @devops-cli-service
    ContributorAuthor

    Owner question: See Suspected block in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

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/aisource/agentstatus/newtype/testvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions