feat(agent): persist production generation settings

This commit is contained in:
2026-07-16 16:07:11 +08:00
parent 245b6b3eca
commit 6c02662d3b
9 changed files with 353 additions and 56 deletions

View File

@@ -494,7 +494,7 @@ def _agent_system_prompt() -> str:
def _max_output_tokens(model: ModelConfig) -> int:
configured = max(1, model.max_token or 1024)
configured = max(1, model.max_token or 8192)
if not model.context_window:
return configured
return min(configured, max(1, model.context_window // 3))