Extract the shared request startup, completion, and cleanup flow so OpenAI and Anthropic routes keep the same wire behavior with less duplicated orchestration.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Move tool allowlist, tool_config, and tooling-context helpers into app/http/tooling_policy.py while keeping route behavior unchanged.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Keep app.main.v1_responses as the compatibility entrypoint while moving the Responses wrapper and SSE bridge into a dedicated module. This reduces app/main.py without changing the existing Responses behavior or test patch points.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Deduplicate allowlist filtering and forced-tool fallback parsing across the OpenAI and Anthropic non-stream bridge paths while preserving existing wire behavior.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Keep the current tool-call bridge contract stable while extracting shared
execution setup and tightening Anthropic forwarding regressions.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Move tool bridge and responses adapter helpers out of app.main so the main entrypoint can shrink without changing route orchestration behavior.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>