Skip to content

fix(litellm): map async call types to the right telemetry endpoint - #273

Merged
azilber merged 3 commits into
mainfrom
retry/pr-2086
Aug 10, 2026
Merged

fix(litellm): map async call types to the right telemetry endpoint#273
azilber merged 3 commits into
mainfrom
retry/pr-2086

Conversation

@azilber

@azilber azilber commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Ports upstream Osmantic#2086: fix(litellm): map async call types to the right telemetry endpoint

Original: Osmantic#2086

Retry pass: conflicted with an earlier port from this run; hunks were disjoint so both were unioned. Lint/structural/legacy-token checked.

tang-vu and others added 3 commits July 25, 2026 22:54
LiteLLM's CallTypes name the calling function, not the wire endpoint:
``completion``/``acompletion`` is the chat API and
``text_completion``/``atext_completion`` is the legacy one. The path
mapping matched only the bare stems and put ``completion`` on the legacy
side, so both async spellings landed in the wrong bucket.

Under the proxy every call is the async variant, which meant every
/v1/completions request was reported to Token Spy as
/v1/chat/completions. The ``responses`` branch already used a substring
test and was unaffected.

Match the text_completion family explicitly and let everything else fall
through to chat, so sync and async spellings agree.
# Conflicts:
#	ods/extensions/services/litellm/tests/test_token_spy_callback.py
@azilber
azilber merged commit f36e55c into main Aug 10, 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.

2 participants