Compare commits

...

2 Commits

Author SHA1 Message Date
Yuge Zhang 8499cd709e . 2025-11-28 10:56:17 +08:00
Yuge Zhang 77cb15ba4d patch llm proxy 2025-11-28 10:42:54 +08:00
3 changed files with 5 additions and 1 deletions
+3
View File
@@ -1159,6 +1159,9 @@ class LLMProxy:
if _global_llm_proxy is not None:
logger.warning("A global LLMProxy is already set. Overwriting it with the new instance.")
# Patch for LiteLLM v1.80.6+: https://github.com/BerriAI/litellm/issues/17243
os.environ["USE_OTEL_LITELLM_REQUEST_SPAN"] = "true"
# Set the global LLMProxy reference for middleware/exporter access.
set_active_llm_proxy(self)
+1 -1
View File
@@ -561,7 +561,7 @@ class AgentModeDaemon:
final_reward = self._fillna_reward(rollout)
if not rollout.triplets:
print(f"Warning: No triplets found for test rollout {rollout.rollout_id}.")
sample_stat_list.append({"reward": final_reward})
sample_stat_list.append({"reward": final_reward, "has_reward": final_reward_raw is not None})
continue
response_length_list = [len(triplet.response.get("token_ids", [])) for triplet in rollout.triplets]
+1
View File
@@ -127,6 +127,7 @@ async def test_basic_integration(qwen25_model: RemoteOpenAIServer, otlp_enabled:
print(f">>> Span: {span.name}")
print(f">>> Start time: {span.start_time}")
print(f">>> End time: {span.end_time}")
print(f">>> Attributes: {span.attributes.keys()}")
assert span.start_time is not None, f"Span {span.name} has no start time"
assert span.end_time is not None, f"Span {span.name} has no end time"