#35068 [Bug]: Failed proxy requests can lose call_type and router metadata in spend logs
## Check for existing issues
- [x] I have searched the existing issues and checked that my issue is not a duplicate.
## What happened?
When a proxied LLM request fails, the failure spend log can be created from a request payload that does not preserve the route's actual call type and does not merge LiteLLM's internal metadata bucket into the spend-tracking metadata.
Observed impact:
- A failed Responses API request can be logged with a stale/default call_type such as acompletion instead of aresponses. - Router metadata stored in litellm_metadata, such as model_group and model_info.id, can be missing from the final SpendLogsPayload for the failed request. - Retry metadata and request tags can be split across metadata/litellm_metadata buckets and fail to reach the failure spend log.
Expected behavior:
- Failed requests should be attributed to the actual proxy route call_type. - Failure spend logs should preserve internal router metadata needed for model-group and deployment-level attribution. - Caller-supplied user_api_key* metadata should not be trusted for spend-log identity attribution.
## Steps to Reproduce
1. Use a proxy route that stores internal metadata in litellm_me…