fix: accept blank tool call arguments

Treat blank OpenAI-compatible tool call arguments as an empty dict so parameterless tools such as finish can execute with providers that return an empty string. Also trim model identifiers during config normalization to avoid leading whitespace leaking into requests and snapshots.
This commit is contained in:
Maple_枫溪
2026-05-05 05:06:26 +08:00
parent 83fdc3c2e2
commit 9e944f7f85
4 changed files with 58 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
from src.config.model_configs import ModelInfo
def test_model_identifier_strips_surrounding_whitespace() -> None:
model_info = ModelInfo(
api_provider="test-provider",
model_identifier=" glm-5.1 ",
name="test-model",
)
assert model_info.model_identifier == "glm-5.1"