Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#438 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript
Área
cli

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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
Lenguaje dominante
TypeScript
Estrellas
960
Forks
62
Merge medio
23 h 46 min
PR fusionados (30 d)
217

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de cloudflare/cf

Todos los issues de cloudflare/cf

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.