Skip to content

Streamed chats, embeddings and tool calls report their model call metrics - #1545

Closed
gedaiu wants to merge 4 commits into
deeplethe:devfrom
re-cinq:feat/otel-model-calls-streaming
Closed

gedaiu wants to merge 4 commits into
deeplethe:devfrom
re-cinq:feat/otel-model-calls-streaming

Conversation

@gedaiu

@gedaiu gedaiu commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Hi! This builds on #1543 (and #1541, #1540), so its diff shows those commits too until they land. Only the last commit is new.

The model call metrics from #1543 now cover chat_at_streaming, embed and chat_tools_with as well as chat_at. All four report through one private helper, so each call gives one record with its duration, outcome and tokens, retries included. Embeddings report their prompt tokens under the task embed, and tool calls under tools.

Extraction now attaches its base to the chat client and to the name-vector embed client, so extraction shows up per base next to adjudication.

The streamed tool calls that chat uses (chat_tools_stream_with) are left for the next PR. That call returns a stream, so its time and tokens have to be read at the end of the stream, which is a different shape.

Thanks for taking a look!

…when OTEL_EXPORTER_OTLP_ENDPOINT is set (deeplethe#1539)

Signed-off-by: Bogdan Szabo <bogdan@re-cinq.com>
…ane and status (deeplethe#1539)

Signed-off-by: Bogdan Szabo <bogdan@re-cinq.com>
…ing with adjudication (deeplethe#1539)

Signed-off-by: Bogdan Szabo <bogdan@re-cinq.com>
…ns and outcome, and extraction reports per base (deeplethe#1539)

Signed-off-by: Bogdan Szabo <bogdan@re-cinq.com>
@gedaiu

gedaiu commented Nov 29, 2026

Copy link
Copy Markdown
Contributor Author

Replaced by #1556, in the shape suggested on #1539. Thank you!

@gedaiu gedaiu closed this Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant