aaif-goose / aaif-goose/goose

Support negotiated model pricing overrides for native providers

Offen
#11,783 2 Kommentare 0 Reaktionen 2 zugewiesene Personen Beansprucht von @jamadeo Auf GitHub ansehen
Vorherrschende Sprache
Rust
Sterne
54.2k
Forks
6.2k
Ø Merge
3 T. 4 Std.
Gemergte PRs (30 T.)
240

Beschreibung

**What problem would this solve?**

Goose estimates usage costs from provider-reported values or bundled pricing. Native providers and enterprise deployments can use negotiated rates that differ from the bundled catalog, but today users cannot supply those rates without creating a custom provider. This is especially limiting for Azure Foundry deployments and other managed endpoints.

**What would a good outcome look like?**

Users can place an optional `pricing.yaml` in the OS-specific Goose configuration directory shown by `goose info`. Exact provider and resolved-model entries override bundled pricing without changing provider authentication or network configuration.

The precedence should be:

1. provider-reported cost
2. user-configured negotiated rate
3. existing custom-provider or bundled catalog rate
4. unavailable

Configured rates should have explicit provenance, use unambiguous per-million-token units, validate safely, preserve existing configuration behavior, and work identically in the legacy and state-machine agent loops.

**Possible approaches**

- Automatically discover `/pricing.yaml`.
- Use exact provider and resolved-model matching to avoid cross-deployment leakage.
- Require input and output USD rates; allow optional cache read/write rates.
- Treat an override as a complete rate set rather than inheriting omitted cache rates from public pricing.
- Extend ACP usage provenance with `user_configured`.
- Keep `GOOSE_ADDITIONAL_CONFIG_FILES` backward compatible, but do not require it for pricing.

**Additional context**

Validated locally with Azure Foundry and `gpt-5.6-sol`: Desktop displayed costs from the configured OpenAI-equivalent rates and the usage ledger recorded `user_configured` provenance.

- [x] I have verified this does not duplicate an existing feature request

Do not begin implementation until the issue reaches **Ready** on the [Goose Issues board](https://github.com/orgs/aaif-goose/projects/1).

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Das Issue erwähnt die Erweiterung der ACP usage provenance und die Arbeit sowohl in legacy- als auch in state-machine agent loops. Beginne damit, die Konfigurationsverzeichnis-Logik zu lokalisieren, die von `goose info` angezeigt wird. Suche nach bestehenden Pricing-Strukturen und dem ACP usage tracking code. Verstehe, wie Provider-Kosten derzeit aufgelöst werden und wo die neue Präzedenzlogik einzufügen ist. Eine erfolgreiche Änderung ermöglicht es einer `pricing.yaml`-Datei, gebündelte Raten zu überschreiben und `user_configured` provenance im Ledger anzuzeigen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
rust
Bereich
ai-infra-agents, backend
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.