plano/crates
Musa b97fa01885 fix(fetch_models): preserve existing providers when keys are missing
Previously fetch_models rebuilt provider_models.yaml from scratch on
every run, so running locally (or in CI) without e.g. ANTHROPIC_API_KEY,
GOOGLE_API_KEY, or AWS Bedrock credentials would silently drop those
providers' entries from the file. The user only meant to refresh what
they had keys for.

Now fetch_models loads the existing provider_models.yaml first and
treats each provider independently:

  - Successful fetch -> entry replaced with fresh data ("updated")
  - Missing API key  -> existing entry preserved ("skipped")
  - Failed fetch     -> existing entry preserved ("failed, kept existing")
  - Missing AWS creds -> Amazon entry preserved instead of running
    `aws bedrock list-foundation-models` and erroring out

If the file doesn't exist yet it starts fresh, same as before. If the
file exists but can't be parsed, the binary refuses to overwrite it and
exits with an error rather than silently nuking it.

Other changes that come along for the ride:

  - HashMap -> BTreeMap for the providers map. Output YAML now has a
    stable, alphabetical provider order across runs (eliminates
    HashMap-iteration churn in PR diffs). The first PR after this
    lands will reorder existing entries one time.
  - Per-provider summary at the end (updated / skipped / failed)
    so the workflow logs and Slack PR body make it obvious what
    actually changed vs. what was left alone.
  - File-level usage comment updated to match the new behavior and
    list the additional env vars (MISTRAL_API_KEY, MIMO_API_KEY).

No tests existed for this binary; manually verified with `env -i` (no
keys at all) that all 13 existing providers are preserved with their
original model counts.
2026-04-24 16:01:41 -07:00
..
.vscode use standard tracing and logging in brightstaff (#721) 2026-02-09 13:33:27 -08:00
brightstaff signals: restore the pre-port flag marker emoji (🚩) (#913) 2026-04-24 13:54:53 -07:00
common fix(routing): auto-migrate v0.3.0 inline routing_preferences to v0.4.0 top-level (#912) 2026-04-24 12:31:44 -07:00
hermesllm fix(fetch_models): preserve existing providers when keys are missing 2026-04-24 16:01:41 -07:00
llm_gateway Add first-class ChatGPT subscription provider support (#881) 2026-04-23 15:34:44 -07:00
prompt_gateway Rename all arch references to plano (#745) 2026-02-13 15:16:56 -08:00
build.sh Use mcp tools for filter chain (#621) 2025-12-17 17:30:14 -08:00
Cargo.lock add jemalloc and /debug/memstats endpoint for OOM diagnosis (#885) 2026-04-23 13:59:12 -07:00
Cargo.toml use standard tracing and logging in brightstaff (#721) 2026-02-09 13:33:27 -08:00