ToolCallingIntegrationChatModel()Return self so the agent can bind tool schemas during tests.
Deterministic tool-calling model for auto-approve integration tests.
Generation is driven entirely by prompt markers (the module-level DCA_*
constants), so output is restart-safe and independent of call ordering — the
same rationale as the parent DeterministicIntegrationChatModel:
DCA_TEST_WRITE_FILE=<path> emits a top-level write_file call.DCA_TEST_DELEGATE_WRITE=<path> emits a task call delegating to the
general-purpose subagent, whose prompt then carries
DCA_SUBAGENT_WRITE_FILE=<path> to trigger the subagent's write_file.DCA_SUBAGENT_WRITE_FILE=<path> emits the subagent's write_file call.Each marker fires only on the agent's first turn (no prior ToolMessage),
so once the tool result returns the model replies with a plain "done" and
the agent loop terminates instead of re-issuing the tool call.