fix(strix): route direct OpenAI fallback through its API base (replacement) - #1331
Conversation
0c6b9a6 mapped the openai-direct prefix and routed the OpenAI key, but the child scan still read LLM_API_BASE_FILE -- the primary provider's endpoint. Observed on LineageWeave#570 (run 32701426812): after both NVIDIA models 429'd, the openai-direct/gpt-5.6-luna fallback reached integrate.api.nvidia.com with an unknown model path and died in 4s with '404 page not found'. When the candidate is explicit-openai and STRIX_OPENAI_FALLBACK_API_BASE_FILE is configured, select that file as the api-base source, exactly mirroring the existing GitHub Models cross-provider routing. Key routing was already correct.
…oint contract Adds a regression contract for the openai-direct fallback API-base fix: override file routes to https://api.openai.com/v1, absence resolves no override (litellm default endpoint) so explicit OpenAI models can never inherit a foreign primary gateway, NVIDIA/GitHub Models primaries keep their bases, and non-https overrides fail configuration. Also records the doctoring evidence and CHANGELOG entry for the routing fix.
….4 contract The model rename in a724582 missed two test expectations that still asserted the nonexistent gpt-5.6-luna default and fallback names; align them with the shipped gpt-5.4 contract so required CI passes.
…dispatch chain The a724582 rename updated strix.yml and the smoke contract but left the opencode-review-dispatch workflow, its agent-contract tests, the failed-check fallback-findings marker, and the pinned review-dispatch blob SHAs asserting the retired model name, so required CI failed with three missing-string markers. Align every remaining reference with the shipped gpt-5.4 direct-OpenAI contract and refresh the paired blob SHAs.
…rimary; dedupe CHANGELOG - CodeRabbit major: the github_models primary's STRIX_FALLBACK_MODELS chain ends in openai-direct/gpt-5.4, but 'Prepare GitHub Models fallback credentials' excluded the github_models mode, so that fallback could not authenticate or route after primary exhaustion. Include github_models in the provisioning step. - Devin bug: remove the four accidentally duplicated [Unreleased] bullets from CHANGELOG.md, keeping a single copy before '### Added'. - Add markdownlint MD040 language to the doctoring evidence fence.
…me Luna comment - Devin bug: the CHANGELOG dedup accidentally removed the four legitimate [Unreleased] bullets entirely; restore them once alongside the two Strix entries so pending history is not dropped. - Devin bug: the OPENCODE_MODEL_CANDIDATES rationale comment still named the retired 'GPT-5.6 Luna' slot with stale pricing; rewrite it for the valid gpt-5.4 direct-OpenAI contract.
|
Warning Review limit reachedNext included review available in 5 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughStrix의 ChangesOpenAI fallback 라우팅
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to The PR correctly routes direct OpenAI fallbacks to the intended API base and preserves provider-specific routing; only a localized documentation clarification remains, with no actionable merge-blocking risk. Sequence Diagram(s)sequenceDiagram
participant Workflow as strix.yml workflow
participant Gate as strix_quick_gate.sh
participant Resolver as resolved_llm_api_base_for_model
participant OpenAI as OpenAI API endpoint
Workflow->>Workflow: OpenAI fallback API base 파일 생성
Workflow->>Gate: STRIX_OPENAI_FALLBACK_API_BASE_FILE 전달
Gate->>Resolver: openai-direct/gpt-5.4 해석 요청
Resolver->>OpenAI: 전용 OpenAI endpoint 선택
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 76.92% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 3 files. (5 skipped: 4 unsupported, 1 too large.) ✨ Finishing Touches 💡 1📝 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 |
|
Addressed Devin\x27s informational review on exact head |
|
Fixed both exact-head review findings on |
|
Resolved the remaining exact-head review note on |
|
Exact-head review follow-up for |
Current-head verification
|
Exact-head maintenance audit
The exact-head OpenCode review dispatch was requested. |
Replacement for #1324
This replacement is rebased onto the current protected
mainand preserves the validated direct-OpenAI fallback repair.Root cause
When NVIDIA NIM, OpenRouter, or GitHub Models exhausted their primary/fallback candidates,
openai-direct/gpt-5.4inherited the primaryLLM_API_BASE(for example the NVIDIA NIM gateway) and failed with404 page not found. The key was cross-provider, but the API base was not.Change
https://api.openai.com/v1fallback base beside the OpenAI fallback key, including thegithub_modelsprimary path.openai-direct/*/openai_direct/*through that explicit base; absent an override, resolve no base so LiteLLM uses the OpenAI default rather than a foreign provider endpoint.gpt-5.4model contract, doctoring record, changelog, and regression tests.Verification
bash scripts/ci/strix_required_workflow_smoke.shpassed.git diff --checkpassed.No secrets, force-push, or merge bypass. Hosted Checks and independent review must re-run on this exact head.
Summary by CodeRabbit
개선 사항
문서