You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Support passing dynamic custom headers to LiteLLM via RunConfig
Merge #4299
**Please ensure you have read the [contribution guide](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) before creating a pull request.**
### Link to Issue or Description of Change
**1. Link to an existing issue (if applicable):**
- Closes: #4297
**Problem:**
When using ADK with LiteLLM, there's no way to pass dynamic per-request HTTP configuration like custom headers, timeouts, or retry options via RunConfig.
**Solution:**
Add an http_options field to RunConfig that propagates through the request pipeline to the model layer. This allows runtime configuration of:
- headers: Custom HTTP headers (auth tokens, tracing IDs, correlation headers)
- timeout: Per-request timeout overrides
- retry_options: Per-request retry configuration
- extra_body: Additional request body parameters
### Testing Plan
**Unit Tests:**
- [X] I have added or updated unit tests for my change.
- [x] All unit tests pass locally.
### Checklist
- [X] I have read the [CONTRIBUTING.md](https://github.com/google/adk-python/blob/main/CONTRIBUTING.md) document.
- [X] I have performed a self-review of my own code.
- [X] I have commented my code, particularly in hard-to-understand areas.
- [X] I have added tests that prove my fix is effective or that my feature works.
- [X] New and existing unit tests pass locally with my changes.
- [X] I have manually tested my changes end-to-end.
- [ ] Any dependent changes have been merged and published in downstream modules.
### Additional context
Co-authored-by: George Weale <gweale@google.com>
COPYBARA_INTEGRATE_REVIEW=#4299 from Faraaz1994:feature/custom_http_headers c7e5f11
PiperOrigin-RevId: 940577536
0 commit comments