Repository navigation
fix: claude header was not set correctly - #1767
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughUpstream Content-Type from Anthropic/AWS responses is now propagated to client responses. The Claude response handler gained an extra parameter at its public entry and now accepts the upstream http.Response internally. Call sites were updated accordingly and the header is set before invoking the handler. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as Client
participant R as NewAPI Relay
participant U as Upstream (Anthropic/AWS)
C->>R: POST /v1/messages
R->>U: Forward request
U-->>R: HTTP 200 + Body + Headers (Content-Type)
rect rgba(230,245,255,0.6)
note over R: Propagate upstream headers
R->>R: Set Response Header: Content-Type = U.Content-Type
end
rect rgba(235,255,235,0.6)
note over R: Handle/stream Claude response
R->>R: HandleClaudeResponseData(ctx, info, claudeInfo, extra=nil, body, mode)
R-->>C: Stream body (IOCopyBytesGracefully), preserving upstream context
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…er-from-upstream fix: claude header was not set correctly
…er-from-upstream fix: claude header was not set correctly
…er-from-upstream fix: claude header was not set correctly
Fixes #1766
Summary by CodeRabbit
Bug Fixes
Refactor