Skip to content

fix(strix): route openai-direct fallback to the OpenAI API base - #1299

Closed
seonghobae wants to merge 4 commits into
mainfrom
fix/strix-openai-direct-api-base
Closed

fix(strix): route openai-direct fallback to the OpenAI API base#1299
seonghobae wants to merge 4 commits into
mainfrom
fix/strix-openai-direct-api-base

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Follow-up to 0c6b9a6. Production evidence: ContextualWisdomLab/LineageWeave#570 strix run 32701426812 (job 97353571099). Both NVIDIA models 429'd, then openai-direct/gpt-5.6-luna failed in 4s with Error: 404 page not found — the prefix mapping and key routing from 0c6b9a6 worked, but the child scan still read LLM_API_BASE_FILE, i.e. the primary provider's endpoint (integrate.api.nvidia.com), where gpt-5.6-luna has no model path.

Fix: when the candidate is explicit-openai (openai_direct/* or openai-direct/*) and STRIX_OPENAI_FALLBACK_API_BASE_FILE is configured, resolved_llm_api_base_for_model selects that file — mirroring the existing GitHub Models cross-provider routing. Key routing was already correct; this completes endpoint+key+name so the terminal fallback can actually complete a scan.

Reuses the existing is_explicit_openai_model helper (no new duplicate).


Open in Devin Review

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.
@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 12 minutes.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4818c3e4-1428-46ac-8d5c-47fe02568ab8

📥 Commits

Reviewing files that changed from the base of the PR and between 613a33e and b92648e.

📒 Files selected for processing (3)
  • .github/workflows/strix.yml
  • scripts/ci/strix_quick_gate.sh
  • scripts/ci/test_strix_quick_gate.sh

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Full gate self-test suite: PASS (0 failures) with this change.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head review loop

  • Pull request: fix(strix): route openai-direct fallback to the OpenAI API base #1299
  • Exact head reviewed: 84eb37943d2b8ad57fd405c858721f71e3144ca6
  • Valid finding fixed: the gate selected STRIX_OPENAI_FALLBACK_API_BASE_FILE, but the workflow never created or forwarded it, so cross-provider direct-OpenAI fallbacks still inherited the primary provider endpoint and could receive a 404.
  • Change: when the dedicated OpenAI fallback key is present, the workflow writes the trusted https://api.openai.com/v1 endpoint to a runner-temporary file and passes its path to the quick gate.
  • Verification: python3 -m pytest -q tests/test_strix_nvidia_nim_not_found_fallback.py — 15 passed; bash -n scripts/ci/strix_quick_gate.sh scripts/ci/test_strix_quick_gate.sh — passed; git diff --check — passed.
  • The branch was pushed only after re-reading the live PR head 5ecbebb0d4bee769826302c24ac00a00c799521b; the new head is 84eb37943d2b8ad57fd405c858721f71e3144ca6.

Please run current-head review and required Checks again. No merge is requested until exact-head gates and eligible approval are present.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Correction to the preceding loop note: the first push used a newly named sibling branch and did not move PR #1299. The PR's actual head branch is fix/strix-openai-direct-api-base; after re-reading the unchanged live head 5ecbebb0d4bee769826302c24ac00a00c799521b, the fix was pushed there. Current PR head is 84eb37943d2b8ad57fd405c858721f71e3144ca6.

devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Current-head validation

  • Exact head: b92648e1df52a9213f46dcbe88e9fc448f6d54a7
  • Exact base: 613a33e0cb1c6db9790fae99f6253445712ac37a
  • Source fix: the fallback credential-preparation step now includes github_models, so its configured openai-direct fallback receives both the direct OpenAI key and https://api.openai.com/v1.
  • Targeted Strix regressions: NVIDIA NIM → direct OpenAI and GitHub Models → direct OpenAI both passed (RC=0); each fake child asserted provider-specific key and API-base isolation.
  • Python targeted tests: 79 passed; full Python suite: 1406 passed, 1 skipped, 16 subtests passed.
  • bash -n, actionlint .github/workflows/strix.yml, and git diff --check: passed.
  • Full shell contract: bounded 600-second run timed out and is not treated as passing evidence.
  • Current PR state: open, non-Draft, mergeable, BLOCKED; required checks are queued/in progress and no independent approval is present.

The current Devin finding about the github_models fallback was fixed at this head. The PR remains on the protected normal path; no bypass or merge was performed.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

Open in Devin Review

Comment thread scripts/ci/strix_quick_gate.sh
@seonghobae
seonghobae enabled auto-merge (squash) August 24, 2026 11:08
@seonghobae
seonghobae disabled auto-merge August 24, 2026 11:23
@seonghobae

Copy link
Copy Markdown
Contributor Author

Exact-head review

Revalidated current head b92648e1df52a9213f46dcbe88e9fc448f6d54a7 across the workflow, routing, and fallback-contract test diff. Explicit direct-OpenAI fallbacks now use the trusted https://api.openai.com/v1 base and dedicated key, including NVIDIA NIM and GitHub Models primary paths; the file is resolved and validated through the existing trusted-input boundary.

Local evidence: filtered NVIDIA-to-OpenAI and GitHub-to-OpenAI fallback cases exited 0; python3 -m pytest -q tests/test_required_workflow_queue_contract.py — 64 passed; bash -n and git diff --check — passed. Current hosted required checks are not terminal and no exact-head independent approval is present; no merge or bypass is justified. @opencode-agent @cwl-noema-review

@seonghobae

Copy link
Copy Markdown
Contributor Author

Additional exact-head validation for b92648e1df52a9213f46dcbe88e9fc448f6d54a7: full central suite 1406 passed, 1 skipped, 16 subtests passed; no source failure observed. Hosted required Checks and independent approval remain authoritative.

@seonghobae
seonghobae enabled auto-merge (squash) August 24, 2026 12:44

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode could not approve from deterministic current-head evidence because GitHub Checks have failed.

Findings

1. HIGH Current-head GitHub Checks - Fix failed required checks before approval

  • Problem: Failed same-head checks remain for b92648e1df52a9213f46dcbe88e9fc448f6d54a7.
  • Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
  • Fix: Read and fix the failed check logs below, then rerun the current-head checks.
  • Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.

Failed checks:

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: strix.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: strix.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["CI script (2 files)"]
  S2 --> I2["review and security gate shell path"]
  I2 --> R2["Review risk: CI script (2 files)"]
  R2 --> V2["bash -n plus Strix self-test"]
Loading

@opencode-agent

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: b92648e1df52a9213f46dcbe88e9fc448f6d54a7
  • Workflow run: 32746100830
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode could not approve from deterministic current-head evidence because GitHub Checks have failed.

Findings

1. HIGH Current-head GitHub Checks - Fix failed required checks before approval

  • Problem: Failed same-head checks remain for b92648e1df52a9213f46dcbe88e9fc448f6d54a7.
  • Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
  • Fix: Read and fix the failed check logs below, then rerun the current-head checks.
  • Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.

Failed checks:

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Workflow: strix.yml"]
  S1 --> I1["GitHub Actions review job"]
  I1 --> R1["Review risk: Workflow: strix.yml"]
  R1 --> V1["actionlint plus required checks"]
  Evidence --> S2["CI script (2 files)"]
  S2 --> I2["review and security gate shell path"]
  I2 --> R2["Review risk: CI script (2 files)"]
  R2 --> V2["bash -n plus Strix self-test"]
Loading

@seonghobae

Copy link
Copy Markdown
Contributor Author

Superseded by current-main replacement PR #1331, which re-uploads the direct-OpenAI fallback API-base/key boundary and incorporates the later review repairs.

@seonghobae seonghobae closed this Aug 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant