Skip to content

docs(router): clarify the ModelNotFound docstring - #211

Open
mattmillerai wants to merge 3 commits into
mainfrom
matt/land-router-spec-sync-9794097
Open

mattmillerai wants to merge 3 commits into
mainfrom
matt/land-router-spec-sync-9794097

Conversation

@mattmillerai

@mattmillerai mattmillerai commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

ELI5

This rewrites the help text for the "model not found" error so it explains more clearly when a model counts as gone, when you are pointed at a replacement, and when you get suggestions instead. It changes wording only. The SDK behaves exactly as before.

Summary

Rewords the ModelNotFound docstring in src/comfy_sdk/router_exceptions.py. That 12-line docstring is the PR's whole diff against main.

  • It now says plainly that the error covers any id Router cannot run, not just unknown ids. It also says the retired-model detail (retirement date, plus a successor when one is visible) replaces the suggestion list.
  • A catalogued id the provider does not currently serve for Comfy gets no suggestions. The docstring now says so in its own paragraph.
  • The class's _spec_meaning_digest (6c0e0e327e4d) is unchanged. It already matches the vendored Router spec.

History. This PR originally carried the cloud@9794097 Router spec sync and the ModelNotFound read-marker re-bless. Both have since landed on main via #209. After a merge from main (no rebase, no force-push), only this branch's docstring wording is left. Merging it lands the clearer wording. Closing it instead loses only that wording.

Provenance

Verified:

  • Final diff against main is the ModelNotFound docstring only. Spec, generated models and digest are all unchanged.
  • At merge commit d999259, the local gates passed: ruff check, ruff format --check, mypy src, pytest (1265 passed, 9 skipped), scripts/check_drift.py and the public-repo hygiene script.
  • PR CI on head d999259 is green: Test py3.10 to 3.13, codegen drift, build-check, public-repo-hygiene.

Deviations:

mattmillerai and others added 2 commits October 9, 2026 22:22
…spec

The synced spec rewrote model_not_found's meaning: a model retired past its
sunset date now lands in this bucket, and its detail names the retirement
date and, when one is visible, a live successor id instead of a suggestion
list. Reword the docstring to cover that and record the new meaning digest
so the drift check and the contract test pass.
@mattmillerai
mattmillerai requested review from a team as code owners October 9, 2026 22:37
@mattmillerai
mattmillerai enabled auto-merge (squash) October 9, 2026 22:37
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: Comfy-Org/comfy-python-sdk/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Team
  • Run ID: 6f9dcbd7-0a40-4a41-9d62-9e0ea058e339
📥 Commits

Reviewing files that changed from the base of the PR and between 6d2dd72 and d999259.

📒 Files selected for processing: 1
  • src/comfy_sdk/router_exceptions.py

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 6 reviews per hour.

📝 Walkthrough

The ModelNotFound documentation now clarifies which provider model states name a runnable model and when retired-model details or suggestions are provided.

Changes: ModelNotFound documentation

Layer / File(s) Summary
Clarify model availability and suggestions
src/comfy_sdk/router_exceptions.py
The docstring clarifies that retired models may include a successor, future sunset dates remain runnable, and unsupported provider models receive no suggestions.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Suggested reviewers: deepme987

Merge Risk: ⚪ Minimal · up to d9992

No actionable merge risk was identified; this is a documentation-only change.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title accurately identifies the router documentation change and names the updated ModelNotFound docstring.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@mattmillerai mattmillerai added the cursor-review Request an automated Cursor review label Oct 9, 2026

@github-actions github-actions 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.

🔍 Cursor Review — Consolidated panel

Triggered by @mattmillerai.

Found 5 finding(s).

Severity Count
🟡 Medium 1
🟢 Low 3
⚪ Nit 1

Panel: 6/6 reviewers contributed findings.

Comment thread spec/router-openapi.yaml
Comment thread spec/router-openapi.yaml
Comment thread spec/router-openapi.yaml
Comment thread spec/router-openapi.yaml
Comment thread spec/router-openapi.yaml
@mattmillerai

Copy link
Copy Markdown
Member Author

🤖 The reviews loop filed Linear follow-up ticket(s) for review thread(s) deferred as out of scope for this PR:

  • BE-19970 — Expose the queued-submit cost estimate on RequestHandle / AsyncRequestHandle — filed as agent-spike (premise unverified)

The following carry agent-spike instead of agent-ok because their reachability claim was not backed by evidence (BE-5378) — the claim is investigated before any code is written, and "the premise does not hold" is a valid, successful outcome:

  • Expose the queued-submit cost estimate on RequestHandle / AsyncRequestHandle — no reachability block in the proposal

main already carries the cloud@9794097 Router spec sync (#209), so
spec/router-openapi.yaml merges clean. The only conflict is the
ModelNotFound docstring; this branch's wording is kept. The read marker
is the same on both sides.
@mattmillerai

Copy link
Copy Markdown
Member Author

De-conflicted against main with a merge commit (d999259; no rebase, no force-push). main already carries this cloud@9794097 Router spec and the re-blessed ModelNotFound read marker via #209, so the only conflict was the ModelNotFound docstring. This branch's wording is kept. The PR's remaining diff against main is that 12-line docstring rewording: the spec, the generated models and the digest are unchanged. Local gates on d999259: ruff, ruff format, mypy src all clean; pytest 1265 passed, 9 skipped; check_drift.py and the hygiene script OK. Merging this for the wording and closing it as landed via #209 are both safe.

@mattmillerai mattmillerai changed the title fix: land the cloud@9794097 Router spec sync (regenerate, reconcile) docs(router): clarify the ModelNotFound docstring Oct 22, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cursor-review Request an automated Cursor review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant