Support negotiated model pricing overrides for native providers
- Langage dominant
- Rust
- Étoiles
- 54.2k
- Forks
- 6.2k
- Merge moyen
- 3 j 2 h
- PR mergées (30 j)
- 262
Description
**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).
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.