## MODIFIED Requirements ### Requirement: Pluggable dual-provider tool-calling abstraction The system SHALL support at least two interchangeable LLM providers (Anthropic native tool use and OpenAI function calling) for the AI Planner's decision calls, selectable via configuration, with both providers constrained to return exactly one tool call per request. Independently of provider selection, the system SHALL support at least two transports for making that decision call -- direct-to-provider (the tool-calling client calls the provider's SDK itself, using locally configured credentials) and cloud-proxy (the tool-calling client calls the Cloud Control Plane's planner-decision endpoint, which calls the provider using cloud-held credentials) -- selectable via configuration without requiring any change to `AIPlanner`'s own decision logic. #### Scenario: Provider selected via configuration - **WHEN** the AI Planner is configured with a given provider identifier - **THEN** it constructs and uses the tool-calling client for that provider without requiring any change to `AIPlanner`'s own decision logic #### Scenario: Provider response resolves to a single decision - **WHEN** either supported provider returns a response to a tool-calling request - **THEN** the response is parsed into exactly one tool name and one arguments object, regardless of which provider produced it #### Scenario: Transport selected via configuration - **WHEN** the Host Agent is configured with a given transport (direct or cloud-proxy) - **THEN** `AIPlanner` is constructed with the tool-calling client for that transport, and its own decision logic is unchanged regardless of which transport is in effect #### Scenario: Cloud-proxy transport is the default - **WHEN** no transport is explicitly configured - **THEN** the AI Planner uses the cloud-proxy transport and the Cloud Control Plane's planner-decision endpoint #### Scenario: Direct transport remains available by explicit configuration - **WHEN** the Host Agent is configured with the direct transport - **THEN** the AI Planner uses the direct-to-provider transport with locally configured credentials #### Scenario: Cloud-proxy transport resolves a decision without a local provider client - **WHEN** the Host Agent is configured with the cloud-proxy transport - **THEN** its tool-calling client sends the decision request to the Cloud Control Plane's planner-decision endpoint instead of constructing a local Anthropic or OpenAI SDK client