mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
fix(completion): keep @tracer.wrap() on completion, not the dispatch context
The dispatch-extraction refactor inserted _CompletionDispatchContext and its helpers between `return entry` and `completion`, which left completion's @tracer.wrap() decorator stranded on the new frozen dataclass. That silently dropped the tracing span from completion, the library's hottest entrypoint, and instead had ddtrace wrap the dataclass constructor (replacing the class with a function wrapper at runtime). Restore the decorator above @client on completion, matching litellm_internal_staging, and remove it from the dataclass.
This commit is contained in:
parent
1c2041177e
commit
20bcd775c4
1 changed files with 1 additions and 1 deletions
|
|
@ -1085,7 +1085,6 @@ def _build_custom_pricing_entry(
|
|||
return entry
|
||||
|
||||
|
||||
@tracer.wrap()
|
||||
@dataclass(frozen=True, slots=True)
|
||||
class _CompletionDispatchContext:
|
||||
_azure_detection_model: str
|
||||
|
|
@ -5011,6 +5010,7 @@ def _complete_langflow(ctx: _CompletionDispatchContext):
|
|||
return response
|
||||
|
||||
|
||||
@tracer.wrap()
|
||||
@client
|
||||
def completion( # type: ignore
|
||||
model: str,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue