Skip to content

Commit 1fa099b

Browse files
去掉trace
1 parent 28c7b6a commit 1fa099b

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

backend/service/mcp_client.py

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,6 @@ async def comfyui_agent_invoke(messages: List[Dict[str, Any]], images: List[Imag
6464
tuple: (text, ext) where text is accumulated text and ext is structured data
6565
"""
6666
try:
67-
# ------------------------------------------------------------------
68-
# Sanitize messages to avoid provider validation errors
69-
# Some backends (e.g. Bedrock via ConverseStream) reject requests if
70-
# the final assistant message content ends with trailing whitespace.
71-
# We defensively strip only *trailing* whitespace from assistant text
72-
# segments, preserving internal spaces and formatting.
73-
# ------------------------------------------------------------------
7467
def _strip_trailing_whitespace_from_messages(
7568
msgs: List[Dict[str, Any]]
7669
) -> List[Dict[str, Any]]:
@@ -276,12 +269,11 @@ def rewrite_handoff_input_filter(data: HandoffInputData) -> HandoffInputData:
276269
agent_input = messages
277270
log.info(f"-- Processing {len(messages)} messages")
278271

279-
from agents import Agent, Runner, set_trace_processors, set_tracing_disabled, set_default_openai_api
280-
from langsmith.wrappers import OpenAIAgentsTracingProcessor
281-
282-
set_tracing_disabled(False)
283-
set_default_openai_api("chat_completions")
284-
set_trace_processors([OpenAIAgentsTracingProcessor()])
272+
# from agents import Agent, Runner, set_trace_processors, set_tracing_disabled, set_default_openai_api
273+
# from langsmith.wrappers import OpenAIAgentsTracingProcessor
274+
# set_tracing_disabled(False)
275+
# set_default_openai_api("chat_completions")
276+
# set_trace_processors([OpenAIAgentsTracingProcessor()])
285277

286278
result = Runner.run_streamed(
287279
agent,

backend/utils/globals.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ def set_comfyui_copilot_api_key(api_key: str) -> None:
9999
_global_state.set('comfyui_copilot_api_key', api_key)
100100

101101

102-
BACKEND_BASE_URL = os.getenv("BACKEND_BASE_URL", "https://comfyui-copilot-server-pre.onrender.com")
102+
BACKEND_BASE_URL = os.getenv("BACKEND_BASE_URL", "https://comfyui-copilot-server.onrender.com")
103103
LMSTUDIO_DEFAULT_BASE_URL = "http://localhost:1234/v1"
104104
WORKFLOW_MODEL_NAME = os.getenv("WORKFLOW_MODEL_NAME", "us.anthropic.claude-sonnet-4-20250514-v1:0")
105105
# WORKFLOW_MODEL_NAME = "gpt-5-2025-08-07-GlobalStandard"
106-
LLM_DEFAULT_BASE_URL = "https://comfyui-copilot-server-pre.onrender.com/v1"
106+
LLM_DEFAULT_BASE_URL = "https://comfyui-copilot-server.onrender.com/v1"
107107

108108
# LLM-related env defaults (used as fallback when request config does not provide values)
109109
OPENAI_API_KEY = os.getenv("CC_OPENAI_API_KEY") or None

0 commit comments

Comments
 (0)