feat(config): default reasoning effort to max (#36)

main
Yixing Lao 2026-05-04 18:28:17 +08:00 committed by GitHub
parent 4eebf78351
commit 3ed8da6307
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 9 additions and 8 deletions

View File

@ -20,7 +20,7 @@ DEFAULT_PORT = 9000
DEFAULT_UPSTREAM_BASE_URL = "https://api.deepseek.com"
DEFAULT_UPSTREAM_MODEL = "deepseek-v4-pro"
DEFAULT_THINKING = "enabled"
DEFAULT_REASONING_EFFORT = "high"
DEFAULT_REASONING_EFFORT = "max"
DEFAULT_DISPLAY_REASONING = True
DEFAULT_COLLAPSIBLE_REASONING = True
DEFAULT_NGROK = True

View File

@ -861,7 +861,7 @@ def build_arg_parser() -> argparse.ArgumentParser:
parser.add_argument(
"--reasoning-effort",
choices=["low", "medium", "high", "max", "xhigh"],
help="DeepSeek reasoning effort, default from config or high",
help="DeepSeek reasoning effort, default from config or max",
)
parser.add_argument(
"--reasoning-content-path",
@ -997,8 +997,9 @@ def log_cursor_request(
) -> None:
model = str(payload.get("model") or config.upstream_model)
LOG.info(
"┌ cursor model=%s messages=%s tools=%s",
"┌ cursor model=%s effort=%s messages=%s tools=%s",
model,
config.reasoning_effort,
format_count(message_count(payload)),
format_count(tool_count(payload)),
)
@ -1332,7 +1333,7 @@ def main(argv: list[str] | None = None) -> int:
store.close()
return 2
LOG.info("ngrok tunnel forwarding %s -> %s", public_url, target_url)
LOG.info("Cursor Base URL: %s/v1", public_url.rstrip("/"))
LOG.info("api base url: %s/v1", public_url.rstrip("/"))
try:
server.serve_forever()
except KeyboardInterrupt:

View File

@ -795,7 +795,7 @@ def prepare_upstream_request(
thinking_disabled = config.thinking == "disabled"
if thinking_enabled:
prepared["reasoning_effort"] = normalize_reasoning_effort(
prepared.get("reasoning_effort") or config.reasoning_effort
config.reasoning_effort
)
cache_namespace = reasoning_cache_namespace(

View File

@ -35,7 +35,7 @@ def _default_cache_namespace() -> str:
ProxyConfig(),
"deepseek-v4-pro",
{"type": "enabled"},
"high",
"max",
)
@ -366,14 +366,14 @@ class CrossModeAndModelTests(unittest.TestCase):
config,
"deepseek-v4-pro",
{"type": "enabled"},
"high",
"max",
"Bearer key-a",
)
namespace_flash = reasoning_cache_namespace(
config,
"deepseek-v4-flash",
{"type": "enabled"},
"high",
"max",
"Bearer key-a",
)
self.assertEqual(namespace_pro, namespace_flash)