fabro/lib/crates/fabro-api/tests
Bryan Helmkamp 34d83db801
feat(model): support open provider catalog data (#245)
## Summary

This PR moves Fabro’s provider/model catalog toward settings-driven
provider identity by replacing the closed provider schema at the
API/auth/model boundary with `ProviderId`, then loading built-in
provider and model metadata from embedded per-provider TOML files.

The immediate result is that built-ins now use the same settings-shaped
catalog data that custom providers will use later, while request-serving
paths still keep the existing bootstrap/default catalog behavior until
the resolved-catalog plumbing lands.

## Changes

- Replaces API-facing provider enum usage with string-backed
`ProviderId`, including OpenAPI/progenitor replacements and regenerated
TypeScript client models.
- Routes model, auth, billing, CLI, server, and workflow call sites
through provider IDs where they cross product identity boundaries.
- Builds `Catalog` from settings-shaped provider/model data with
validation for adapter keys, OpenAI-compatible `base_url`, duplicate
aliases, provider defaults, disabled entries, model controls, and
per-speed cost rows.
- Replaces `catalog.json` with embedded provider TOML files under
`lib/crates/fabro-model/src/catalog/providers/`.
- Adds an explicit `fabro_model::bootstrap_catalog` hatch for
setup/install paths and extends the dev policy test to keep bootstrap
access contained.
- Preserves public training and knowledge-cutoff labels in LLM model
settings while still accepting bare TOML dates.

## Verification

- `cargo nextest run -p fabro-model -p fabro-config -p fabro-api` — 416
passed
- `cargo nextest run -p fabro-dev --features dev
bootstrap_catalog_references_stay_in_allowlist` — 1 passed
- `cargo +nightly-2026-04-14 fmt --check --all`
- `cargo +nightly-2026-04-14 clippy --workspace --all-targets -- -D
warnings`
- `cargo build --workspace`
- `git diff --check`

---

[![Compound
Engineering](https://img.shields.io/badge/Compound_Engineering-6366f1)](https://github.com/EveryInc/compound-engineering-plugin)
🤖 Generated with GPT-5 via [Codex](https://openai.com/codex)
2026-05-12 15:42:49 -04:00
..
billed_token_counts_round_trip.rs refactor(api): tighten shared type schemas 2026-04-30 06:20:05 -04:00
command_termination_round_trip.rs feat(command): distinguish cancelled commands from timeouts 2026-04-30 22:45:37 -04:00
diff_stats_round_trip.rs refactor: unify duplicate API types via with_replacement 2026-04-28 12:29:37 -07:00
diff_summary_round_trip.rs feat(runs): surface diff summary counts 2026-05-07 17:34:32 -07:00
event_envelope_round_trip.rs refactor(api): reuse canonical run events 2026-04-29 20:36:59 -04:00
git_context_round_trip.rs refactor: unify duplicate API types via with_replacement 2026-04-28 12:29:37 -07:00
interview_option_round_trip.rs refactor(api): align run projection types 2026-04-29 20:32:50 -04:00
interview_question_record_round_trip.rs refactor(api): align run projection types 2026-04-29 20:32:50 -04:00
model_costs_round_trip.rs refactor(api): tighten shared type schemas 2026-04-30 06:20:05 -04:00
model_features_round_trip.rs refactor(api): tighten shared type schemas 2026-04-30 06:20:05 -04:00
model_limits_round_trip.rs refactor(api): tighten shared type schemas 2026-04-30 06:20:05 -04:00
model_round_trip.rs feat(model): support open provider catalog data (#245) 2026-05-12 15:42:49 -04:00
model_test_mode_round_trip.rs refactor(api): tighten shared type schemas 2026-04-30 06:20:05 -04:00
pending_interview_record_round_trip.rs refactor(runs): simplify run projection shape 2026-05-09 23:31:43 -04:00
pre_run_push_outcome_round_trip.rs refactor: unify duplicate API types via with_replacement 2026-04-28 12:29:37 -07:00
principal_round_trip.rs Fix principal auth gap regressions 2026-05-02 10:02:12 -04:00
provider_round_trip.rs feat(model): support open provider catalog data (#245) 2026-05-12 15:42:49 -04:00
pull_request_round_trip.rs feat(api): unify public run shape 2026-05-10 20:48:55 -04:00
question_type_round_trip.rs refactor(api): unify leaf API types 2026-04-29 20:21:23 -04:00
run_billing_stage_round_trip.rs Read billing and stages from RunProjection with live runtimes (#213) 2026-05-05 09:32:33 -04:00
run_event_round_trip.rs refactor(workflow): remove local worktree mode 2026-05-09 11:04:23 -04:00
run_integrations_round_trip.rs Move GitHub token permissions to [run.integrations.github.permissions] (#215) 2026-05-05 15:33:31 -04:00
run_projection_round_trip.rs feat(api): unify public run shape 2026-05-10 20:48:55 -04:00
run_sandbox_round_trip.rs feat(api): unify public run shape 2026-05-10 20:48:55 -04:00
run_summary_round_trip.rs refactor(types): remove legacy run summary shape 2026-05-10 23:29:41 -04:00
sandbox_details_round_trip.rs feat(api): unify public run shape 2026-05-10 20:48:55 -04:00
sandbox_services_round_trip.rs fix(server): improve sandbox service discovery 2026-05-10 12:40:38 -04:00
secret_metadata_round_trip.rs refactor(api): unify secret metadata types 2026-04-29 20:26:13 -04:00
secret_type_round_trip.rs refactor: unify duplicate API types via with_replacement 2026-04-28 12:29:37 -07:00
server_settings_round_trip.rs feat(server): support stdout log destination 2026-04-26 14:52:15 -04:00
stage_completion_round_trip.rs refactor(run-projection): use stage vocabulary 2026-05-01 19:56:22 -04:00
stage_handler_round_trip.rs feat(api): expose stage handlers on run stages 2026-05-08 13:36:02 -07:00
stage_outcome_round_trip.rs refactor(api): tighten shared type schemas 2026-04-30 06:20:05 -04:00
stage_projection_round_trip.rs feat(billing): project live stage token usage 2026-05-09 15:25:51 -04:00
stage_state_round_trip.rs refactor(api): tighten shared type schemas 2026-04-30 06:20:05 -04:00
status_round_trip.rs feat(api): unify public run shape 2026-05-10 20:48:55 -04:00
submit_answer_request_round_trip.rs fix(api): type interview answer submissions 2026-05-08 09:18:35 -07:00
workflow_settings_round_trip.rs fix(workflow): ignore deprecated project directory 2026-05-09 10:55:56 -04:00