Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/claude-messages/tests/test_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,12 +426,16 @@ async def test_config_cannot_override_model_or_messages(

config = {
**CONFIG,
"tools": {
"search": {"name": "search", "type": "function", "parameters": {}}
},
"model": {
**CONFIG["model"],
"parameters": {
"model": "not-the-real-model",
"messages": "not-the-real-messages",
"system": "not-the-real-system",
"tools": [{"name": "not-the-real-tool", "input_schema": {}}],
},
},
}
Expand All @@ -444,6 +448,8 @@ async def test_config_cannot_override_model_or_messages(
"system" not in call_kwargs
or call_kwargs["system"] != "not-the-real-system"
)
assert [t["name"] for t in call_kwargs["tools"]] == ["search"]
assert "not-the-real-tool" not in str(call_kwargs)

async def test_call_unchanged_when_no_parameters_set(
self, mock_anthropic: MagicMock
Expand Down
Loading