aboutsummaryrefslogtreecommitdiffstats
path: root/assistant.py
diff options
context:
space:
mode:
Diffstat (limited to 'assistant.py')
-rw-r--r--assistant.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/assistant.py b/assistant.py
index e2b576d..725f21d 100644
--- a/assistant.py
+++ b/assistant.py
@@ -757,7 +757,9 @@ def stream(conn, path, body, calls, meter=True):
# How full the model's context is: history, tool results and
# tool definitions all count.
ctx["used"] = chunk["usage"]["prompt_tokens"]
- emit({"type": "ctx", "used": ctx["used"], "max": ctx["max"]})
+ # The model too: the router can have swapped it since hello,
+ # and a client showing the hello's name would show a stale one.
+ emit({"type": "ctx", "used": ctx["used"], "max": ctx["max"], "model": ctx["model"]})
choices = chunk["choices"]
if not choices:
continue