Add Basic auth for OpenAI-compatible providers - #126
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe OpenAI transport adds ChangesBasic authentication
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to The PR adds explicit Basic authentication for OpenAI-compatible providers while preserving existing auth styles; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Warning Your free Security trial is over. An organization admin can activate Security or dismiss this notice. Comment |
How this change flows1 changed behaviour across 10 relationships. 6 surrounding behaviours are shown (60 graph nodes walked). 43 further behaviours left out to keep the diagram readable. flowchart LR
n0["auth_headers_bearer_is_the_default<br/>changed"]:::changed
n1["auth_headers"]:::impacted
n2["...ne_knobs_default_to_supported_wire_shapes"]:::impacted
n3["translate_request"]:::impacted
n4["Tool"]:::impacted
n5["with_tool_choice"]:::impacted
n6["to_value"]:::impacted
n0 -->|calls| n1
n0 -->|tests| n1
n2 -->|calls| n3
n2 -->|tests| n3
n2 -->|calls| n4
n2 -->|tests| n4
n2 -->|calls| n5
n2 -->|tests| n5
n2 -->|calls| n6
n2 -->|tests| n6
classDef changed fill:#0d4429,stroke:#238636,color:#e6edf3
classDef impacted fill:#161b22,stroke:#6e7681,color:#c9d1d9
classDef flagged fill:#5a1e02,stroke:#d93f0b,color:#ffffff
classDef blocking fill:#67060c,stroke:#f85149,color:#ffffff
Green: changed behaviour. Grey: surrounding behaviour. Arrows name the call, use, implementation, or test relationship. Orange: has findings. Red: has a finding that blocks the merge. |
Summary
Add an explicit HTTP Basic authentication style for OpenAI-compatible providers, enabling hosts to integrate providers such as Inworld without disguising credentials as Bearer tokens. Empty Basic credentials emit no Authorization header.
API Or Behavior Changes
Adds the public AuthStyle::Basic variant. Requests using it send Authorization: Basic . Existing auth styles are unchanged.
Tests
Added focused auth-header tests for populated and empty Basic credentials. The full default-feature suite passed: 1,784 unit tests, integration tests, and 49 doc tests.
Documentation
Updated AuthStyle rustdoc and the transport-level authentication overview.
Summary by CodeRabbit
New Features
Bug Fixes
Basicscheme when configured.Tests