fabro/lib
Scott Werner f72f3fb972 feat(workflow): typed openrouter_* stage attrs for OR routing controls
Adds OpenRouterOptions and two strum-derived enums (OpenRouterProviderSort,
OpenRouterDataCollection) to fabro-llm. The workflow handler parses five
new stage attrs into the struct and serializes them into the nested
{provider: {...}, models: [...], transforms: [...]} JSON shape OpenRouter
expects, embedded under Request.provider_options["openrouter"]:

- openrouter_provider_sort: "price" | "throughput" | "latency"
- openrouter_fallback_models: comma-separated model id list
- openrouter_transforms: comma-separated transform name list
- openrouter_allow_fallbacks: bool
- openrouter_data_collection: "allow" | "deny"

The existing merge_provider_options path in openai_chat::request pastes
the json into the outgoing request body, so this works through the
generic plumbing without OpenRouter-specific code in the shared module.

EffectiveRequestControls loses Copy (Vec<String> fields don't qualify);
complete_one_shot_request now takes a reference.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-28 17:05:08 -04:00
..
crates feat(workflow): typed openrouter_* stage attrs for OR routing controls 2026-05-28 17:05:08 -04:00
packages/fabro-api-client feat(llm): add Response.cost_usd and CostSource across all adapters 2026-05-28 17:05:08 -04:00