ExchangeCompatRouting exchange.compat-routing@1
Generated at from
openvibe-contracts v0.419.0 and
openvibe-sdk v0.161.0.
- Version
- 1.0.0
- Owner
- exchange
- Visibility
- public
- Status
- active
- Compatibility
- backward
- Decision
- ADR-025
- Schema
https://openvibe.network/contracts/exchange/compat-routing.v1.json
OpenRouter-compatible model fallback and provider policy controls. Prices are USD per million tokens.
Fields
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
model | string |
| ||
models | array of string |
| ||
provider | object |
| ||
provider.order | array of string |
| ||
provider.only | array of string |
| ||
provider.ignore | array of string |
| ||
provider.allow_fallbacks | boolean | |||
provider.sort | enum |
| ||
provider.max_price | object |
| ||
provider.max_price.prompt | number |
| ||
provider.max_price.completion | number |
| ||
provider.data_collection | enum |
| ||
provider.zdr | boolean | |||
usage | object |
| ||
usage.include | boolean |
Examples
From the contract's own test fixtures: valid ones validate, rejected ones must fail.
Valid: example
{
"model": "maker/model:free",
"models": [
"maker/backup"
],
"provider": {
"sort": "value",
"zdr": true
},
"usage": {
"include": true
}
}Rejected: example
{
"provider": {
"sort": "magic"
}
}Validate
const contracts = require('openvibe-contracts');
contracts.validate('exchange.compat-routing@1', value); // { valid, errors: [{ path, message }] }