Skip to content

test(claude-messages): cover tools in the handler-owned settings test - #276

Merged
jeffdupont merged 3 commits into
mainfrom
jdupont/aic-3737-owned-tools-test
Nov 20, 2026
Merged

jeffdupont merged 3 commits into
mainfrom
jdupont/aic-3737-owned-tools-test

Conversation

@jeffdupont

@jeffdupont jeffdupont commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The claude-messages handler takes model, the messages, the system prompt and tools from the config, never from model.parameters. The existing test (test_config_cannot_override_model_or_messages) covered every one except tools. This PR adds tools:

  • The config offers one tool (search), and model.parameters sets a different tools list.
  • The test asserts that the provider call's tools holds only search, and that the parameters' tool appears nowhere in the call arguments.

No handler code changes.

Tests

  • uv run ruff check ., uv run ruff format --check .: pass.
  • uv run pytest packages/claude-messages: 171 passed.

🤖 Generated with Claude Code


Note

Overview
Extends test_config_cannot_override_model_or_messages so tools is covered alongside model, messages, and system: config defines a search tool (with a stub handler), model.parameters supplies a different tools list, and the test checks the Anthropic call uses only search and never not-the-real-tool.

No handler changes—this is test coverage only, locking in that tool definitions are handler-owned from config, not overridable via model.parameters.

Reviewed by Cursor Bugbot for commit 1304568. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jeffdupont
jeffdupont marked this pull request as ready for review November 4, 2026 19:55
@jeffdupont jeffdupont changed the title test(AIC-3737): cover tools in the handler-owned settings test test(claude-messages): cover tools in the handler-owned settings test Nov 20, 2026
@jeffdupont
jeffdupont merged commit b7e21cc into main Nov 20, 2026
13 checks passed
@jeffdupont
jeffdupont deleted the jdupont/aic-3737-owned-tools-test branch November 20, 2026 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants