Replace the draft
update_dynamic_route_draftSaves draft changes without deploying. Omitted description, graph and layout are preserved; an empty description clears it. Supply the complete graph to replace it. Structural errors reject the save; inspect meta.issues and data.draft.validation for remaining issues before deployment. Use simulate_dynamic_route without version_number to test the saved draft; deploy_dynamic_route performs full deployment validation. Requires the dynamic_routes:write scope.
Graph format: an object with an elements array. Each element has a unique id, a type, optional properties, and outputs, an object mapping output names to {"elementId":"target-node-id"}. Include id: START, type: start and id: END, type: end; input and output are not node types. A minimal deployable graph (replace the model with an available catalog ID permitted by your policy):
{"elements":[{"id":"START","type":"start","outputs":{"next":{"elementId":"primary"}}},{"id":"primary","type":"model","properties":{"model":"cerebras/gpt-oss-120b"},"outputs":{"success":{"elementId":"END"},"fallback":{"elementId":"END"}}},{"id":"END","type":"end","outputs":{}}]}Supported node types and properties:
start: the START node;outputs.nextselects the first node.end: the END node;outputsis{}.model:properties.modelis a catalog model ID.outputs.successtargets END or an observe node;outputs.fallbacktargets another model, pool, or END.pool:properties.modelscontains 2-10{model,metrics}candidates;properties.expressionis a numeric CEL expression such asmodel.cost, sorted ascending. Uses the same success/fallback outputs as model.conditional:properties.casescontains{id,expression}entries; each expression is a CEL predicate overmetadata,auth, andinput. Connect an output for each case ID and adefaultoutput. The first true case wins.percentage:properties.bucketscontains at least two{id,weight}entries with positive integer weights totaling 100. Connect an output for each bucket ID.classifier:properties.casescontains 2-10{id,label,instructions}entries with unique labels, plus optionalcontextandmodelproperties. Connect an output per case ID; no default output. Classification failures fail the route.observe:properties.criteriadefines an asynchronous evaluation, with optionalscore_type(scoreorbinary),model,threshold, andsample_rate(both greater than 0 and at most 1). Place after model/pool success or another observe node;outputs.nextleads to another observe node or END.
Graphs must be acyclic. Every node except END accepts at most one incoming edge; use separate model nodes on separate branches. Deployment requires each path from START to reach a model or pool before END.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>"
},
"name": "update_dynamic_route_draft"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Route name | |
| graph | No | Routing graph object with elements. Each node has id, type, outputs mapping output names to {elementId: targetID}, and optional properties. Include START/start and END/end. Supported types: start, end, model, pool, conditional, percentage, classifier, observe. Omit graph on create to seed a default; copy its returned draft.graph to customize. See tool description for node properties and topology. | |
| layout | No | Editor canvas positions keyed by element id. Opaque to the gateway. | |
| description | No | New description. Omit to leave it unchanged. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| meta | No |