An adapter turns a route profile into a client’s own model configuration. Write it in two phases. The mapping is the same in both; only where the profile comes from changes.
Input. An effective profile, the shape scripts/resolve.py writes to examples/effective/:
{ "workflow": "arazzo/<route>/arazzo.json#<workflowId>",
"layers": { "model": {...}, "provider": {...}, "account": {...} },
"effective": {...}, // the layers merged, least specific first (jq `*`)
"live": ["provider.limit.context", ...] } // outputs only a runner can fill
Read effective. Read layers only to show where a value came from. A path listed in
live is unknown in phase 1.
Pin. Record the profile’s sha256 (the digest of its describedby descriptor, or of the
file) next to the generated configuration, so a changed profile is a visible diff.
tokens.per says how many tokens one price
buys, so a client priced per million multiplies by 1000000 / per.PT5M, PT1H); convert to the client’s unit.controls.<field>.support of rejected means the client must not send the field;
ignored means sending it has no effect.Precedence. The user’s explicit configuration beats the profile; the profile beats the client’s bundled catalog, because the serving host, not the model card, decides served limits and prices.
examples/effective/ produces an expected client
configuration, checked byte for byte. A second test lists every facts path present in
the input that the adapter did not map, against a committed list, so a new field in the
profile shows up as a failing test until it is mapped or declared unmapped.Replace the static file with a run of the workflow, which fills the live outputs from the
provider’s own API (served context, account balance, loaded quantization). Runners that read
Arazzo: Python arazzo-runner (CLI execute-workflow; its Arazzo 1.1 support is not
established), TypeScript @usearazzo/runner (library; its docs list Arazzo 1.1.0), Redocly
respect (CLI; its docs say Arazzo 1.0.1 only). The mapping
table and the tests from phase 1 do not change; the golden inputs gain the live values.
Run a live workflow only when the user asks: some steps cost money (a request that loads a model or sends a prompt), and an account layer reads the user’s own balance.