Preserve llm-connect run config in server mode
Some checks failed
CI / test (3.10) (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled

This commit is contained in:
2026-05-19 20:55:02 +02:00
parent c11c6afa3f
commit 82e3c07928
3 changed files with 265 additions and 8 deletions

View File

@@ -125,10 +125,28 @@ class TestExecute:
try:
status, body = _post(
f"http://127.0.0.1:{s.port}/execute",
{"prompt": "hi", "config": {"model_name": "gpt-3.5-turbo", "max_tokens": 100}},
{
"prompt": "hi",
"config": {
"model_name": "gpt-3.5-turbo",
"max_tokens": 100,
"max_depth": 2,
"model_params": {"reasoning_effort": "medium"},
},
},
)
assert status == 200
assert adapter.last_config.model_name == "gpt-3.5-turbo"
assert adapter.last_config.max_tokens == 100
assert adapter.last_config.max_depth == 2
assert adapter.last_config.model_params == {"reasoning_effort": "medium"}
finally:
s.stop()
def test_config_must_be_object(self, server):
status, body = _post(
f"http://127.0.0.1:{server.port}/execute",
{"prompt": "hi", "config": "not an object"},
)
assert status == 400
assert "config" in body["error"]