feat(agent): add debug output switches

This commit is contained in:
2026-07-17 14:19:23 +08:00
parent a879dc2ff1
commit c7bafda135
5 changed files with 60 additions and 4 deletions

View File

@@ -48,6 +48,7 @@ class AgentDebugService:
"presence_penalty": payload.presencePenalty,
"frequency_penalty": payload.frequencyPenalty,
"max_token": payload.maxToken,
"stream_enabled": payload.streamEnabled,
}
@classmethod
@@ -62,7 +63,7 @@ class AgentDebugService:
yield {"type": "error", "message": "模型不存在"}
return
try:
reasoning_visible = ReasoningPolicyService.is_visible(db)
reasoning_visible = payload.reasoningVisible == 1
yield {
"type": "status",
"stage": "retrieving",

View File

@@ -169,7 +169,7 @@ def _copy_model_with_overrides(model: ModelConfig, overrides: dict[str, Any]) ->
frequency_penalty=overrides.get("frequency_penalty"),
max_token=overrides.get("max_token"),
context_window=model.context_window,
stream_enabled=model.stream_enabled,
stream_enabled=overrides.get("stream_enabled", model.stream_enabled),
response_format=model.response_format,
extra_params=model.extra_params,
remark=model.remark,