You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Switchyard also records the selected and served models, fallback use,
54
+
routing-call latency, routing overhead, and failures.
55
+
56
+
No single total-cost or savings metric is emitted today. Relay prices the
57
+
caller-facing answer, but it does not automatically price Switchyard's internal
58
+
routing calls. For the common case, calculate the observed routed cost as:
59
+
60
+
```text
61
+
Relay answer cost + cost of Switchyard tokens where call_role = "routing"
62
+
```
30
63
31
-
Routing is not free. Some routes call another model to help choose the model
32
-
that will answer. The plugin records the tokens used to make that choice
33
-
separately from the tokens used for the answer. It also records the routing
34
-
time, model choice, fallback, and failures.
64
+
Apply the price of each `target_model` to those routing tokens. Do not add
65
+
`call_role = "answer"` again because it describes the same successful answer
66
+
that Relay recorded. Do not sum every `token_type`; `total` is a rollup, and
67
+
cache or reasoning values may be a more detailed view of another count.
35
68
36
-
Relay can [estimate the cost of the response returned to the agent](https://docs.nvidia.com/nemo/relay/v0.8.3/nemo-relay-cli/basic-usage#add-model-pricing-for-cost-estimates)
37
-
when model pricing is configured. It does not automatically price Switchyard's
38
-
internal routing calls, so include the token counts from those calls when
39
-
calculating the total. Run the same work once with a fixed model and once with
40
-
routing to see whether routing actually saved money. If a provider does not
41
-
report usage, the cost is unknown rather than zero.
69
+
Relay does not ship a canonical price catalog. Follow its
0 commit comments