The 307 trailing-slash redirects generated by Starlette's Mount and
StaticFiles classes construct their Location header from the raw host
header in the ASGI scope. Uvicorn's ProxyHeadersMiddleware only handles
X-Forwarded-Proto and X-Forwarded-For — it does not rewrite the host.
This adds a lightweight ASGI middleware that rewrites scope["headers"]
host and scope["server"] from X-Forwarded-Host when present, so all
redirect URLs use the external hostname instead of internal pod IPs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Enable uvicorn ProxyHeadersMiddleware to rewrite ASGI scope from
X-Forwarded-Proto/For headers. Add X-Forwarded-Host support to
get_custom_url for login/SSO redirects. Replace StaticFiles with a
subclass that serves index.html directly instead of issuing trailing-
slash 302 redirects that use internal hostnames.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Replace Zapier webhook with Google Form for survey submission
* Add back error logging for survey submission debugging
---------
Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
* fix: feat: add litellm_system_prompt support
* feat: support new 'litellm_agent' model provider
* feat: ui/ - new agent builder ui
* fix(anthropic/chat/transformation.py): normalize max_tokens if decimal
* feat(agentbuilderview.tsx): run compliance datasets against litellm agent
* feat: new response rejection detector
* fix: multiple fixes
* feat: add mcp tools support to agent builder
create an agent with access to llm's + mcp servers
* fix: feat: add litellm_system_prompt support
* feat: support new 'litellm_agent' model provider
* feat: ui/ - new agent builder ui
* fix(anthropic/chat/transformation.py): normalize max_tokens if decimal
* feat(agentbuilderview.tsx): run compliance datasets against litellm agent
Replace Click CliRunner with standalone_mode=False to avoid
"I/O operation on closed file" errors caused by Click's stream
isolation in CI environments.
* fix(logging): preserve pass-through endpoint response_cost in async_success_handler
Two places in the logging pipeline were overwriting response_cost that
pass-through handlers (Gemini/Vertex) had already calculated:
1. _process_hidden_params_and_response_cost fell through to
_response_cost_calculator which returns None for pass-through calls
2. async_success_handler pass-through branch unconditionally set
response_cost = None (introduced in PR #19887)
Now both places check if response_cost is already set before overwriting.
* test: add regression test for pass-through endpoint response_cost preservation
When a cached response had `response_cost` pre-calculated in its `_hidden_params`
(from the original response), `_process_hidden_params_and_response_cost` was using
it directly without checking `cache_hit`, so cached responses were reported with
non-zero cost instead of 0.
Fixes test_cost_tracking_with_caching.