|
246 | 246 | * provider entry's, merged, the entry winning. |
247 | 247 | * |
248 | 248 | * @typedef {object} AiModelMeta |
| 249 | + * @property {string} [label] The model's human name, for pickers and |
| 250 | + * receipts ("Opus 5"); the id stays the wire truth. |
249 | 251 | * @property {number} [contextWindow] |
250 | 252 | * @property {number} [maxOutputTokens] |
| 253 | + * @property {string[]} [reasoning] The values a call may pass as its |
| 254 | + * `reasoning` for this model, in the provider's own vocabulary. |
| 255 | + * Informational: read back by modelCatalog, never enforced by the engine — |
| 256 | + * the adapter keeps its own rejections. |
251 | 257 | * @property {string[]} [aspects] The image ratios the model supports, as 'W:H'. |
252 | 258 | */ |
253 | 259 |
|
|
265 | 271 | * @property {string[]} [aspects] Present for an image resolution. |
266 | 272 | */ |
267 | 273 |
|
| 274 | +/** |
| 275 | + * What modelCatalog reports: the whole routing configuration, shaped for |
| 276 | + * building pickers. Every object is a copy, safe to serialize or amend. |
| 277 | + * |
| 278 | + * @typedef {object} AiModelCatalog |
| 279 | + * @property {{ default: string, levels: Object<string, { provider: string, |
| 280 | + * model: string, reasoning?: string }> }} effort The resolved routing |
| 281 | + * table and the level an effortless call lands on. |
| 282 | + * @property {Object<string, { label: string, |
| 283 | + * capabilities: Object<string, boolean>, |
| 284 | + * models: Object<string, AiModelMeta> }>} providers Configured providers |
| 285 | + * by name, each with its adapter's label and merged model metadata. |
| 286 | + */ |
| 287 | + |
268 | 288 | /** |
269 | 289 | * A provider adapter: the translation between the normalized protocol above and |
270 | 290 | * one service's dialect. Registered with addAdapter and instantiated per |
|
274 | 294 | * @typedef {object} AiAdapter |
275 | 295 | * @property {string} name The registry name. A provider entry names it with |
276 | 296 | * `adapter`, or shares its own key with it. |
| 297 | + * @property {string} label The service's human name ("Anthropic (Claude)"). |
277 | 298 | * @property {string} [envKey] The environment variable the key is read from |
278 | 299 | * unless the entry names its own. |
279 | 300 | * @property {string} [baseUrl] |
|
0 commit comments