harness-providers: models.dev catalog + cost display wiring (M3)
- modelsdev.rs: ModelCatalog parses models.dev api.json → ModelInfo keyed by (provider, model); 24h file cache at ~/.cache/ai-harness/models.json with a baked assets/models-snapshot.json fallback so cost/limits work offline. load_cached_or_baked (no network) + refresh/refresh_default_cache (background). - App: loads the catalog at init (cached-or-baked, never blocks), warms the cache in a background task, and passes the session model's pricing into RunConfig.cost so session cost accrues for real. - TUI: AppState tracks session_cost/session_tokens from Session events; status bar shows "<tokens> · $<cost>". Snapshots updated. - 7 modelsdev tests (parse, defaults, unknown-model, baked snapshot, cache TTL, cached-vs-baked load). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Generated
+1
@@ -679,6 +679,7 @@ dependencies = [
|
||||
"thiserror 2.0.18",
|
||||
"tokio",
|
||||
"tokio-util",
|
||||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
Reference in New Issue
Block a user