Optimize request
optimize_requestAnalyze your planned LLM call to find a cheaper capable model and estimate savings, all performed offline.
Instructions
Check whether a cheaper capable model exists for a call you plan to make, and report the savings. Offline.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| currentModel | Yes | The model you plan to call (alias or id). | |
| inputTokens | Yes | Input tokens for the call. | |
| outputTokens | Yes | Output tokens for the call. | |
| taskClass | No | Task class; sets the tier the recommendation must still meet. | |
| crossProvider | No | Consider other providers too (may need a different API key). Default false. | |
| providers | No | Axis 1: provider availability allowlist (spec 5.4). | |
| target | No | Axis 2: "self" (default) applies the client scope; "code" considers all providers. | |
| includeLocal | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| current | Yes | ||
| recommended | Yes | ||
| savingsUsd | Yes | ||
| savingsPct | Yes | ||
| alreadyOptimal | Yes | ||
| reasoning | Yes | ||
| providerScope | Yes | ||
| scopeSource | Yes | ||
| catalogVersion | Yes | ||
| asOf | Yes |