mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-10-26 16:55:08 +00:00
fix(sdk): preserve Python config positional arguments
This commit is contained in:
1 parent
4f063cd2f4
commit
0ff3d1ddd2
2 files changed
+8
-2
No files matched your search
@@ -23,7 +23,6 @@ class DeepSeekHarnessConfig:
|
||||
model: str = "deepseek-v4-flash"
|
||||
reasoning_effort: str | None = None
|
||||
max_tokens: int | None = None
|
||||
approval_requests: bool = False
|
||||
cwd: str | None = None
|
||||
runtime_cwd: str | None = None
|
||||
dsh_bin: str | None = None
|
||||
@@ -36,6 +35,7 @@ class DeepSeekHarnessConfig:
|
||||
shutdown_timeout_seconds: float | None = 1.0
|
||||
base_url: str | None = None
|
||||
api_key: str | None = None
|
||||
approval_requests: bool = False
|
||||
|
||||
|
||||
@dataclass(slots=True)
|
||||
|
||||
@@ -7,7 +7,7 @@ from pathlib import Path
|
||||
import pytest
|
||||
from pydantic import ValidationError
|
||||
|
||||
from deepseek_harness import ApprovalRequestParams, ApprovalRequestResult, HarnessClient
|
||||
from deepseek_harness import ApprovalRequestParams, ApprovalRequestResult, DeepSeekHarnessConfig, HarnessClient
|
||||
|
||||
|
||||
@pytest.mark.parametrize("enabled", [False, True])
|
||||
@@ -47,3 +47,9 @@ for line in sys.stdin:
|
||||
def test_approval_result_rejects_unrecognized_grants() -> None:
|
||||
with pytest.raises(ValidationError):
|
||||
ApprovalRequestResult(outcome="allow-always")
|
||||
|
||||
|
||||
def test_approval_opt_in_preserves_existing_config_positional_arguments() -> None:
|
||||
config = DeepSeekHarnessConfig("mock", "model", None, None, "/workspace")
|
||||
assert config.cwd == "/workspace"
|
||||
assert config.approval_requests is False
|
||||
Reference in new issue
Block a user