fix(logging): restore request_tags and tighten system_prompt typing

This commit is contained in:
Souravrajvi0 2026-08-11 05:43:27 +00:00
parent acb5ebd34b
commit 76146880dc
2 changed files with 7 additions and 6 deletions

View file

@ -4716,12 +4716,12 @@ class StandardLoggingPayloadSetup:
if kwargs is None:
return None
if kwargs.get("system_instructions") is not None:
return kwargs.get("system_instructions")
if kwargs.get("instructions") is not None:
return kwargs.get("instructions")
if kwargs.get("system") is not None:
return kwargs.get("system")
for key in ("system_instructions", "instructions", "system"):
value = kwargs.get(key)
if value is None:
continue
if isinstance(value, (str, list, dict)):
return value
return None
@staticmethod

View file

@ -3155,6 +3155,7 @@ class StandardLoggingPayload(TypedDict):
cache_hit: bool | None
cache_key: str | None
saved_cache_cost: float
request_tags: list
end_user: str | None
requester_ip_address: str | None
user_agent: str | None