Skip to content

Auto-pagination for list commands (e.g. ai-gateway logs list is capped at 50 per page) #554

Open

Description

@heredia21

Version: 1.0.0-beta.28

cf ai-gateway logs list accepts --per-page up to 50 (--per-page 1000 returns API error 7001, "Number must be less than or equal to 50"). To total the cost a gateway logged over a 30-day window (there's no API for a gateway's running spend against its spend limit), a script has to loop --page 1, 2, 3 … until a short page comes back. That's tens of calls a day per gateway, each parsing the CLI output.

Suggestions:

  • An --all (or --page-all) option on list commands that follows pagination and streams every row (JSON lines would be ideal for scripts).
  • Optionally, for AI Gateway specifically, a summary like cf ai-gateway logs summary --start-date … --group-by model returning total cost/requests, or a way to read a gateway's current usage against its spend-limit rules.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions