Skip to content

fix(llm): namespace github-models model ids for the GA endpoint (bare id → 404) - #2825

Merged
stranske merged 5 commits into
mainfrom
fix-github-models-namespaced-ids
Jul 24, 2026
Merged

fix(llm): namespace github-models model ids for the GA endpoint (bare id → 404)#2825
stranske merged 5 commits into
mainfrom
fix-github-models-namespaced-ids

Conversation

@stranske

Copy link
Copy Markdown
Owner

What

github-models/codex-mini-latest returned 404 page not found in the maint-78 pilot (run 30112277194). The GitHub Models GA endpoint (models.github.ai/inference, already the value in code) requires publisher-namespaced ids like openai/gpt-5 (which is in the catalog and works); a bare id like codex-mini-latest 404s.

Fix

_github_model_id() defaults a bare id to the openai/ publisher; already-namespaced ids (openai/gpt-5, mistral-ai/…) pass through unchanged. _build_github_client uses it.

Honest scope

Verification

ruff==0.15.20 / black==26.5.1 -l100 / mypy==2.1.0 (CI-pinned) clean; pytest tests/tools/test_langchain_client.py → 63 passed, incl. 4 new (_github_model_id namespaces bare / preserves namespaced; _build_github_client sends namespaced). Updated 2 tests that asserted verbatim pass-through (a pre-GA assumption).

🤖 Generated with Claude Code

The GitHub Models GA endpoint (models.github.ai/inference) requires
publisher-namespaced ids (e.g. openai/gpt-5). A bare id returns "404 page not
found" — which is why github-models/codex-mini-latest failed the maint-78 pilot
(run 30112277194). Add _github_model_id(): default a bare id to the openai/
publisher; already-namespaced ids pass through unchanged.

Scope/honesty: this fixes the bare-id-on-GA-endpoint 404 CLASS. If a specific id
(e.g. codex-mini-latest) is not in the GitHub Models catalog at all, namespacing
won't help and the durable fix is an owner-reviewed change of the github-models
selection to a catalogued id (openai/gpt-5 is already catalogued). Per-candidate
preflight tolerance (#2824) already prevents this from aborting a whole pilot.

Updated two tests that asserted verbatim pass-through (a pre-GA assumption) to the
namespaced expectation. ruff/black/mypy (CI-pinned) clean; 63 tests pass incl. 4 new.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@stranske stranske added bug Something isn't working priority: medium labels Jul 24, 2026
@stranske
stranske enabled auto-merge (squash) July 24, 2026 22:01
@cursor

cursor Bot commented Jul 24, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 36 minutes

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 76976e5c-8359-4dde-87cd-488eed3ebad2

📥 Commits

Reviewing files that changed from the base of the PR and between 9e04b91 and 8199d30.

📒 Files selected for processing (4)
  • langsmith-fleet-worker-attempt.json
  • tests/scripts/test_task_decomposer.py
  • tests/tools/test_langchain_client.py
  • tools/langchain_client.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-github-models-namespaced-ids

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a487c8d222

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/langchain_client.py
) -> object:
kwargs: dict = {
"model": model,
"model": _github_model_id(model),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Update the task decomposer's model assertion

When the broader test suite exercises the GitHub Models path, this normalization makes tests/scripts/test_task_decomposer.py::test_get_llm_client_github_token_defaults fail because line 514 still expects the registry's bare codex-mini-latest, while the constructed client now contains openai/codex-mini-latest. Running pytest -q tests/scripts/test_task_decomposer.py tests/tools/test_llm_provider.py tests/test_github_models_provider.py reproduces the failure (1 failed, 161 passed), so the change cannot pass Gate until that downstream contract is updated.

Useful? React with 👍 / 👎.

…guard)

# Conflicts:
#	tests/tools/test_langchain_client.py
@stranske
stranske temporarily deployed to agent-standard July 24, 2026 22:44 — with GitHub Actions Inactive
@agents-workflows-bot

Copy link
Copy Markdown
Contributor

Workflow source needed

PR #2825 needs either a linked GitHub issue or one valid non-issue Workflow Source before PR metadata automation can manage it safely.

Please do one of:

  • Add <!-- meta:issue:123 --> or a normal Closes #123 / Related to #123 line.
  • Check one Workflow Source option in the PR body.
  • Add a hidden marker such as <!-- workflow-source:local_request -->, <!-- workflow-source:manual_remote -->, <!-- workflow-source:review_followup -->, <!-- workflow-source:sync_campaign -->, or <!-- workflow-source:dependabot -->.
  • Add a workflow source label such as workflow:source-direct-pr, workflow:source-local-request, workflow:source-review-followup, workflow:source-sync, or workflow:no-automation.

Once a valid source is present, this warning will not be reposted.

@stranske-keepalive

stranske-keepalive Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Automated Status Summary

Head SHA: d972dff
Latest Runs: ⏳ pending — Gate
Required contexts: Gate / gate, Health 45 Agents Guard / guard
Required: core tests (3.12): ⏳ pending, core tests (3.13): ⏳ pending, docker smoke: ⏳ pending, gate: ⏳ pending

Workflow / Job Result Logs
(no jobs reported) ⏳ pending

Coverage Overview

  • Coverage history entries: 1

Coverage Trend

Metric Value
Current 75.74%
Baseline 85.00%
Delta -9.26%
Minimum 70.00%
Status ✅ Pass

Top Coverage Hotspots (lowest coverage)

File Coverage Missing
scripts/issue_dedup_smoke.py 0.0% 4
scripts/runner_lib/__main__.py 0.0% 3
scripts/validate_template_sync.py 0.0% 81
scripts/langchain/topic_splitter.py 19.1% 57
tools/codex_log_analyzer.py 19.6% 140
scripts/repo_review_round2_runner.py 25.1% 344
scripts/prune_agent_stubs.py 39.7% 26
scripts/repo_review_round1_runner.py 40.7% 133
tools/ensure_workflow_timeout_variables.py 42.1% 74
scripts/sync_label_docs.py 42.9% 64
tools/discover_model_catalog.py 44.8% 55
scripts/repo_review_backlog_scan.py 45.3% 116
scripts/repo_review_body_writer.py 46.5% 86
tools/codex_session_analyzer.py 47.9% 59
scripts/create_verifier_labels.py 48.3% 58

Low Coverage Files (<50.0%)

File Coverage Missing
scripts/issue_dedup_smoke.py 0.0% 4
scripts/runner_lib/__main__.py 0.0% 3
scripts/validate_template_sync.py 0.0% 81
scripts/langchain/topic_splitter.py 19.1% 57
tools/codex_log_analyzer.py 19.6% 140
scripts/repo_review_round2_runner.py 25.1% 344
scripts/prune_agent_stubs.py 39.7% 26
scripts/repo_review_round1_runner.py 40.7% 133
tools/ensure_workflow_timeout_variables.py 42.1% 74
scripts/sync_label_docs.py 42.9% 64
tools/discover_model_catalog.py 44.8% 55
scripts/repo_review_backlog_scan.py 45.3% 116
scripts/repo_review_body_writer.py 46.5% 86
tools/codex_session_analyzer.py 47.9% 59
scripts/create_verifier_labels.py 48.3% 58

Updated automatically; will refresh on subsequent CI/Docker completions.


Keepalive checklist

Scope

No scope information available

Tasks

  • No tasks defined

Acceptance criteria

  • No acceptance criteria defined

@stranske

stranske commented Jul 24, 2026

Copy link
Copy Markdown
Owner Author

Runner dispatch state for autofix on PR #2825. Do not edit.

… for GA namespacing

Two follow-ups to the #2825 merge:
- tests/tools/test_langchain_client.py: commit the black-formatted version (the
  post-merge black ran in the worktree but the staged pre-format version was
  committed, so CI black flagged 'would reformat').
- tests/scripts/test_task_decomposer.py: the github client model kwarg is now
  publisher-namespaced (openai/...), so assert against _github_model_id(...) of
  the configured model rather than the bare id.

ruff/black (CI-pinned) clean on the whole tree; affected test files pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@stranske
stranske temporarily deployed to agent-standard July 24, 2026 22:57 — with GitHub Actions Inactive
@stranske
stranske merged commit fcf8c21 into main Jul 24, 2026
44 checks passed
@stranske
stranske deleted the fix-github-models-namespaced-ids branch July 24, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant