Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

AI Gateway spend limits aren't discoverable: `cf cli search` misses the `gateways update --spend-limits-*` flags

Aperta
#438 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
cli

Direzione di ricerca

Start by reading the CLI search implementation and the AI Gateway command definitions, especially gateways update and its --spend-limits-* flags; the issue names no source files or tests. Compare how R2 exposes focused subcommands and how CLI help describes structured rule options. Done means search finds spend-limit controls and users can find clear rule documentation; the issue proposes several substantial alternatives without choosing one.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

AI Gateway spend limits can be set from the CLI, but only as flags on cf ai-gateway gateways update (--spend-limits-enabled, --spend-limits-rules). cf cli search does not surface them, so it is easy to conclude the CLI can't manage spend limits at all.

Steps to reproduce

cf cli search "set spend limit rules on an AI gateway"
cf cli search "AI gateway spend limits"
cf cli search "budget for AI gateway"

The results list cf ai-gateway gateways create/get/update/delete and unrelated Zero Trust gateway rules, with summaries like "Update a gateway". Nothing mentions spend limits. cf ai-gateway --help has no spend-limit group either. The only way to find the feature is to read cf schema ai-gateway gateways update and spot spend-limits-rules.

Why it matters

  • Spend limits are a cost-safety feature; people looking for them are trying to cap spend and may give up or switch to the dashboard.
  • gateways update is a PUT, so setting spend limits that way means resending every other gateway setting. Leaving fields out risks resetting them (for example authentication). A focused command avoids that.
  • The rule format (limitType, limit, window, technique, and how to scope by model, provider or metadata) is not described in the CLI help; --spend-limits-rules is documented only as "The spend_limits.rules field".

Suggested improvements

  1. Make cf cli search index flag names and their descriptions (or add keywords), so "spend limit" finds gateways update --spend-limits-*.
  2. Add dedicated commands, e.g. cf ai-gateway spend-limits get|set|add-rule|remove-rule <gateway>, that change only spend_limits (a PATCH or read-modify-write), like cf r2 buckets locks / lifecycle do for R2.
  3. Document the rule object in --help (fields, units for window, fixed vs sliding, and the dimension format for model / provider / metadata scoping) with an example.

Environment

  • cf CLI 1.0.0-beta.23
  • Linux
Lingua principale
TypeScript
Stelle
960
Fork
62
Merge medio
23h 46m
PR unite (30g)
217

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cloudflare/cf

Tutte le issue di cloudflare/cf

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.