feat(usage): attribute xAI attempts to their resolved credential source - #3762
Conversation
Carry #3642 and rederive provenance after transport rebuilds while preserving finalized combo child attribution. Co-authored-by: olddonkey <olddonkeyblog@gmail.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughThe change adds request-time xAI credential-source tracking for OAuth and API-key transports. It records sources across retries and provider changes, filters invalid values during usage-log normalization, tests persistence and masking, and documents the resulting fields. ChangesxAI credential-source tracking
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant NativeChat
participant ResponsesCore
participant RequestLog
participant UsageLog
Client->>NativeChat: Submit a native Chat request
NativeChat->>RequestLog: Record active provider and adapter
Client->>ResponsesCore: Submit a Responses request
ResponsesCore->>RequestLog: Record resolved or rebuilt attempt
RequestLog->>UsageLog: Persist canonical xAI credentialSource
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
|
✅ Deterministic PR hygiene checks passed. |
|
Exact-head Cross-platform CI 34026465820 completed SUCCESS on 63282e4 (Linux test 1/4-4/4, macOS 1/2-2/2, gates, ci). Independent source/security review already passed through this head. Maintainer-integration choice: admin merge into current dev after assert-mergeable-review.sh --maintainer-integration 3762; no rebase; no branch delete. Native stack #3759 remains dissolved. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Summary
grok-oauthorxai-api-keyfrom the resolved upstream transport; historical, custom and other-provider attempts remain unlabelled.Co-authored-by: olddonkey olddonkeyblog@gmail.com
Verification
Checklist
This is the next layer above #3758 in the manual dependent PR chain. Source #3642 remains open until this attributed carry lands. The repository owner authorized bottom-up maintainer integration after current-head CI passes.
Native stack #3759 was dissolved at the owner's explicit request. The PR head is preserved; integration continues bottom-up with ordinary PRs and admin merge after current-head CI.
Sidecar verification
Exact-head Cross-platform CI 34026465820 completed SUCCESS on 63282e4 (Linux test 1/4-4/4, macOS 1/2-2/2, gates, ci). Independent source/security review already passed through this head. Maintainer-integration choice: admin merge into current dev after assert-mergeable-review.sh --maintainer-integration 3762; no rebase; no branch delete. Native stack #3759 remains dissolved.
Summary by CodeRabbit
New Features
Documentation