Repository navigation
feat(adapters): agentic tool calling surface (CAC-02, DSE-1807) - #67
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an additive agentic tool-calling surface to the provider adapter protocol. Prerequisite for DSE TUI P0 (DSE-1807).
What changes
ToolSpec,ToolCall,AgenticResponsedataclasses inadapters/base.py.text/tool_call/tool_result) withassistant_tool_call_message()andtool_result_message()helpers; each adapter translates to its own wire shape.supports_tool_callsclass flag. The agent loop must check it — capability is never inferred from a model name.build_request/stream_requestgaintoolsandtool_choice;messageswidened tolist[dict]so content may be a block list.parse_agentic_response()—parse_response() -> tuple[str, TokenUsage|None]cannot express a tool call, so this is parallel rather than a breaking change.tool_use/tool_result,tool_use_idcarried end-to-end, stop-reason normalization, parallel calls preserved in emission order). OpenAI-compat and Gemini declaresupports_tool_calls = Falseand raiseProviderError.toolsandoutput_contractare mutually exclusive — raisesValueError. Forced-tool structured output and agentic tool calling are different modes;parse_agentic_responsenever consults forced-tool state.Additive guarantee
String-content request bodies are byte-identical to before. Asserted by
test_string_content_body_is_unchanged_by_the_new_surface; the pre-existing suite required zero changes.Verification (builder, fresh)
870 passed in 37.97s— full suite28 passed in 0.08s—tests/test_agentic_tools.pyruff check src/conclave tests— All checks passedruff format --check— 6 files already formattedRelease control
Classifies
security-specificon accumulated keywords only: the sole trigger isredactappearing on a changed line because adding five names re-wrapped a one-line import inadapters/__init__.py.redact()is unchanged; every other file classifiesroutine-non-securityin isolation. Receipt granted by Ernest Provo in authenticated session at head SHAd3603f7b706cf9dd2cd7445b1f96b7a101f4e7b8.🤖 Generated with Claude Code
https://claude.ai/code/session_01H5GFPdJDb2VEuqv7X8Wn6E