Repository navigation
feat(opengateway): add Ling 3.0 Tiny :free — Day-0 launch, free until August 13 - #2112
Conversation
… Aug 13 inclusionai/ling-3.0-tiny:free (7.9B MoE, ~1.3B active, 262k ctx) joins the picker via the gateway's OpenRouter wiring. The gateway time-boxes it (free through Aug 13, rate limited) and delists it server-side when the window closes.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📜 Recent review details⏰ Context from checks skipped due to timeout. (5)
🧰 Additional context used📓 Path-based instructions (9)**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{tsx,ts}📄 CodeRabbit inference engine (AGENTS.md)
Files:
src/**/*.ts📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{test,spec}.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{test,spec}.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
**/*📄 CodeRabbit inference engine (CONTRIBUTING.md)
Files:
⚙️ CodeRabbit configuration file
Files:
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}⚙️ CodeRabbit configuration file
Files:
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}⚙️ CodeRabbit configuration file
Files:
🔇 Additional comments (2)
📝 WalkthroughWalkthroughThe PR registers ChangesLing 3.0 Tiny Free Model
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 3❌ Failed checks (3 warnings)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/commands/model/model.test.tsx`:
- Line 1452: Add a focused integration assertion in the model picker tests
covering opengateway-ling-3.0-tiny-free, verifying that both apiName and
modelDescriptorId resolve to inclusionai/ling-3.0-tiny:free, rather than only
checking descriptor inclusion.
In `@src/integrations/gateways/gitlawb-opengateway.ts`:
- Around line 157-166: Update the catalog entry identified by
opengateway-ling-3.0-tiny-free so it is hidden or expires after August 13, 2026,
using the existing integration lifecycle-guard pattern. Clarify its notes to
state “Free through August 13, 2026 (rate limited)” and ensure the picker cannot
expose it after the cutoff; alternatively remove it before that date and add the
corresponding boundary regression test.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 65558c70-4fbe-4e8d-9b9d-59416d2b0986
📒 Files selected for processing (4)
src/commands/model/model.test.tsxsrc/integrations/brands/ling.tssrc/integrations/gateways/gitlawb-opengateway.tssrc/integrations/models/ling.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (5)
- GitHub Check: smoke-and-tests (24.11.x)
- GitHub Check: smoke-and-tests (22)
- GitHub Check: typecheck
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use TypeScript strict mode and ESM imports throughout the source code.
Run
bun run typecheckandbun run typecheck:type-testsfor TypeScript changes when applicable.
Files:
src/integrations/models/ling.tssrc/integrations/brands/ling.tssrc/integrations/gateways/gitlawb-opengateway.tssrc/commands/model/model.test.tsx
**/*.{tsx,ts}
📄 CodeRabbit inference engine (AGENTS.md)
Use React and Ink patterns for terminal UI components.
Files:
src/integrations/models/ling.tssrc/integrations/brands/ling.tssrc/integrations/gateways/gitlawb-opengateway.tssrc/commands/model/model.test.tsx
src/**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
src/**/*.ts: Prefer existing service, provider, settings, permission, and UI patterns over introducing new abstractions.
Usechalkfor terminal color andexecafor child-process execution when those capabilities are needed.
Files:
src/integrations/models/ling.tssrc/integrations/brands/ling.tssrc/integrations/gateways/gitlawb-opengateway.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Do not add new Python code, Python provider paths, or Python dependencies without explicit maintainer approval.
**/*.{ts,tsx,js,jsx}: Follow the existing code style in touched source files, prefer small readable changes, avoid unrelated reformatting, and keep comments useful and concise.
Preserve existing repository patterns unless intentionally refactoring them, and avoid broad rewrites or unnecessary generated changes.
Review AI-assisted code for correctness, style consistency, unnecessary changes, and adherence to project architecture before submitting it.
Files:
src/integrations/models/ling.tssrc/integrations/brands/ling.tssrc/integrations/gateways/gitlawb-opengateway.tssrc/commands/model/model.test.tsx
**/*
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Update documentation when setup, commands, or user-facing behavior changes.
Files:
src/integrations/models/ling.tssrc/integrations/brands/ling.tssrc/integrations/gateways/gitlawb-opengateway.tssrc/commands/model/model.test.tsx
⚙️ CodeRabbit configuration file
**/*: Apply the OpenClaude maintainer review rubric from AGENTS.md. Review the current diff, not stale discussion context. Separate real blockers from suggestions. Do not request changes for vague style churn. Treat approval as merge-ready from CodeRabbit's side, pending required human review and GitHub Checks. If checks are failing or unavailable, say so clearly instead of implying the PR is fully ready.
Files:
src/integrations/models/ling.tssrc/integrations/brands/ling.tssrc/integrations/gateways/gitlawb-opengateway.tssrc/commands/model/model.test.tsx
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}
⚙️ CodeRabbit configuration file
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}: Review provider routing, model selection, env precedence, auth/token handling, OpenAI-compatible shims, retries, proxy behavior, and outbound HTTP behavior with high scrutiny. Block on silent default changes, hidden fallback expansion, credential reuse mistakes, hardcoded provider assumptions, or new network reach that is not intentional and documented.
Files:
src/integrations/models/ling.tssrc/integrations/brands/ling.tssrc/integrations/gateways/gitlawb-opengateway.ts
**/*.{test,spec}.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Add or update tests when behavior changes, and run the narrowest useful focused test checks.
Files:
src/commands/model/model.test.tsx
**/*.{test,spec}.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.{test,spec}.{ts,tsx,js,jsx}: Add or update tests when a code change affects behavior.
Use focused tests such asbun test ./path/to/test-file.test.tswhen validating a narrowly scoped change.
Files:
src/commands/model/model.test.tsx
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}
⚙️ CodeRabbit configuration file
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}: Review tests for meaningful coverage of the changed behavior, isolation of global/env/config state, async cleanup, fake timers, provider profile leaks, and Windows-compatible assumptions. Block when risky runtime changes lack focused regression coverage or tests assert implementation details while missing the user-visible behavior.
Files:
src/commands/model/model.test.tsx
🔇 Additional comments (2)
src/integrations/models/ling.ts (1)
22-39: LGTM!src/integrations/brands/ling.ts (1)
15-15: LGTM!
Addresses CodeRabbit review on #2112: - new ling-tiny.test.ts (macaron.test.ts pattern) asserting the opengateway-ling-3.0-tiny-free entry maps both apiName and modelDescriptorId to inclusionai/ling-3.0-tiny:free, plus descriptor capabilities and runtime limits - catalog note now dated explicitly ('Free through August 13, 2026') and the entry's lifecycle documented: the gateway time-boxes the id server-side and 400s after the window; this static catalog has no expiry mechanism (Ling Flash precedent), so the entry is removed or updated at window close
|
@coderabbitai please do a full code review again |
|
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/integrations/gateways/gitlawb-opengateway.ts`:
- Around line 157-170: The static catalog entry opengateway-ling-3.0-tiny-free
needs lifecycle enforcement after its August 13, 2026 cutoff. Add a guard in the
catalog construction or model-selection flow that hides/removes this entry at
expiry, reusing the gateway’s existing expiry source if available, and add a
boundary regression test covering the cutoff while preserving visibility before
it.
In `@src/integrations/ling-tiny.test.ts`:
- Around line 21-27: Update the capability assertion in the focused Ling test to
include supportsPreciseTokenCount and verify it is false, matching the provider
definition in ling.ts so future capability changes fail the regression test.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 6c9b6441-5dc1-47cc-85e2-806c852bb681
📒 Files selected for processing (5)
src/commands/model/model.test.tsxsrc/integrations/brands/ling.tssrc/integrations/gateways/gitlawb-opengateway.tssrc/integrations/ling-tiny.test.tssrc/integrations/models/ling.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use TypeScript strict mode and ESM imports throughout the source code.
Run
bun run typecheckandbun run typecheck:type-testsfor TypeScript changes when applicable.
Files:
src/integrations/gateways/gitlawb-opengateway.tssrc/integrations/brands/ling.tssrc/commands/model/model.test.tsxsrc/integrations/models/ling.tssrc/integrations/ling-tiny.test.ts
**/*.{tsx,ts}
📄 CodeRabbit inference engine (AGENTS.md)
Use React and Ink patterns for terminal UI components.
Files:
src/integrations/gateways/gitlawb-opengateway.tssrc/integrations/brands/ling.tssrc/commands/model/model.test.tsxsrc/integrations/models/ling.tssrc/integrations/ling-tiny.test.ts
src/**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
src/**/*.ts: Prefer existing service, provider, settings, permission, and UI patterns over introducing new abstractions.
Usechalkfor terminal color andexecafor child-process execution when those capabilities are needed.
Files:
src/integrations/gateways/gitlawb-opengateway.tssrc/integrations/brands/ling.tssrc/integrations/models/ling.tssrc/integrations/ling-tiny.test.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Do not add new Python code, Python provider paths, or Python dependencies without explicit maintainer approval.
**/*.{ts,tsx,js,jsx}: Follow the existing code style in touched source files, prefer small readable changes, avoid unrelated reformatting, and keep comments useful and concise.
Preserve existing repository patterns unless intentionally refactoring them, and avoid broad rewrites or unnecessary generated changes.
Review AI-assisted code for correctness, style consistency, unnecessary changes, and adherence to project architecture before submitting it.
Files:
src/integrations/gateways/gitlawb-opengateway.tssrc/integrations/brands/ling.tssrc/commands/model/model.test.tsxsrc/integrations/models/ling.tssrc/integrations/ling-tiny.test.ts
**/*
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Update documentation when setup, commands, or user-facing behavior changes.
Files:
src/integrations/gateways/gitlawb-opengateway.tssrc/integrations/brands/ling.tssrc/commands/model/model.test.tsxsrc/integrations/models/ling.tssrc/integrations/ling-tiny.test.ts
⚙️ CodeRabbit configuration file
**/*: Apply the OpenClaude maintainer review rubric from AGENTS.md. Review the current diff, not stale discussion context. Separate real blockers from suggestions. Do not request changes for vague style churn. Treat approval as merge-ready from CodeRabbit's side, pending required human review and GitHub Checks. If checks are failing or unavailable, say so clearly instead of implying the PR is fully ready.
Files:
src/integrations/gateways/gitlawb-opengateway.tssrc/integrations/brands/ling.tssrc/commands/model/model.test.tsxsrc/integrations/models/ling.tssrc/integrations/ling-tiny.test.ts
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}
⚙️ CodeRabbit configuration file
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}: Review provider routing, model selection, env precedence, auth/token handling, OpenAI-compatible shims, retries, proxy behavior, and outbound HTTP behavior with high scrutiny. Block on silent default changes, hidden fallback expansion, credential reuse mistakes, hardcoded provider assumptions, or new network reach that is not intentional and documented.
Files:
src/integrations/gateways/gitlawb-opengateway.tssrc/integrations/brands/ling.tssrc/integrations/models/ling.tssrc/integrations/ling-tiny.test.ts
**/*.{test,spec}.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Add or update tests when behavior changes, and run the narrowest useful focused test checks.
Files:
src/commands/model/model.test.tsxsrc/integrations/ling-tiny.test.ts
**/*.{test,spec}.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.{test,spec}.{ts,tsx,js,jsx}: Add or update tests when a code change affects behavior.
Use focused tests such asbun test ./path/to/test-file.test.tswhen validating a narrowly scoped change.
Files:
src/commands/model/model.test.tsxsrc/integrations/ling-tiny.test.ts
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}
⚙️ CodeRabbit configuration file
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}: Review tests for meaningful coverage of the changed behavior, isolation of global/env/config state, async cleanup, fake timers, provider profile leaks, and Windows-compatible assumptions. Block when risky runtime changes lack focused regression coverage or tests assert implementation details while missing the user-visible behavior.
Files:
src/commands/model/model.test.tsxsrc/integrations/ling-tiny.test.ts
🔇 Additional comments (4)
src/integrations/models/ling.ts (1)
22-39: LGTM!src/integrations/brands/ling.ts (1)
15-15: LGTM!src/commands/model/model.test.tsx (1)
1452-1452: LGTM!src/integrations/ling-tiny.test.ts (1)
10-48: 🗄️ Data Integrity & IntegrationRun the focused checks in an environment with Bun installed.
All four commands fail because
bunis not found.
…cle guard Addresses CodeRabbit round 2 on #2112: - new optional ModelCatalogEntry.availableUntil (ISO-8601): entries past the cutoff are dropped in getCatalogEntriesForRoute, the single choke point behind the model picker, gateway catalogs, and runtime limits; the pre-existing (previously unenforced) hidden flag is honored in the same filter; unparseable dates fail open - the Ling Tiny entry sets availableUntil to the gateway's window end (2026-08-13T10:00:00Z), so the picker drops it the instant the gateway starts rejecting the id — no client release needed - boundary regression test on both sides of the cutoff, and the picker expected-list test pins the clock inside the window (setSystemTime) so it stays deterministic after the date passes - ling-tiny.test.ts now also asserts supportsPreciseTokenCount: false
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/integrations/gateways/gitlawb-opengateway.ts`:
- Around line 170-174: Update the lifecycle comment immediately preceding
availableUntil in the gateway catalog entry to state that availableUntil serves
as the lifecycle/expiry guard and controls when the picker stops offering the
entry; remove the outdated claim that expiry requires manual catalog removal,
while preserving the existing server-side window synchronization guidance.
In `@src/integrations/ling-tiny.test.ts`:
- Around line 13-14: Add an exact-cutoff fixture for 2026-08-13T10:00:00Z in the
availability tests, and extend registry tests around the relevant registry
behavior to cover hidden entries and malformed availableUntil values. Run the
focused Bun tests and required typechecks, then document the exact commands used
in the PR.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 45a2f001-7b9b-4e73-af59-a9476d1645e2
📒 Files selected for processing (5)
src/commands/model/model.test.tsxsrc/integrations/descriptors.tssrc/integrations/gateways/gitlawb-opengateway.tssrc/integrations/ling-tiny.test.tssrc/integrations/registry.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use TypeScript strict mode and ESM imports throughout the source code.
Run
bun run typecheckandbun run typecheck:type-testsfor TypeScript changes when applicable.
Files:
src/integrations/gateways/gitlawb-opengateway.tssrc/integrations/ling-tiny.test.tssrc/integrations/descriptors.tssrc/commands/model/model.test.tsxsrc/integrations/registry.ts
**/*.{tsx,ts}
📄 CodeRabbit inference engine (AGENTS.md)
Use React and Ink patterns for terminal UI components.
Files:
src/integrations/gateways/gitlawb-opengateway.tssrc/integrations/ling-tiny.test.tssrc/integrations/descriptors.tssrc/commands/model/model.test.tsxsrc/integrations/registry.ts
src/**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
src/**/*.ts: Prefer existing service, provider, settings, permission, and UI patterns over introducing new abstractions.
Usechalkfor terminal color andexecafor child-process execution when those capabilities are needed.
Files:
src/integrations/gateways/gitlawb-opengateway.tssrc/integrations/ling-tiny.test.tssrc/integrations/descriptors.tssrc/integrations/registry.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Do not add new Python code, Python provider paths, or Python dependencies without explicit maintainer approval.
**/*.{ts,tsx,js,jsx}: Follow the existing code style in touched source files, prefer small readable changes, avoid unrelated reformatting, and keep comments useful and concise.
Preserve existing repository patterns unless intentionally refactoring them, and avoid broad rewrites or unnecessary generated changes.
Review AI-assisted code for correctness, style consistency, unnecessary changes, and adherence to project architecture before submitting it.
Files:
src/integrations/gateways/gitlawb-opengateway.tssrc/integrations/ling-tiny.test.tssrc/integrations/descriptors.tssrc/commands/model/model.test.tsxsrc/integrations/registry.ts
**/*
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Update documentation when setup, commands, or user-facing behavior changes.
Files:
src/integrations/gateways/gitlawb-opengateway.tssrc/integrations/ling-tiny.test.tssrc/integrations/descriptors.tssrc/commands/model/model.test.tsxsrc/integrations/registry.ts
⚙️ CodeRabbit configuration file
**/*: Apply the OpenClaude maintainer review rubric from AGENTS.md. Review the current diff, not stale discussion context. Separate real blockers from suggestions. Do not request changes for vague style churn. Treat approval as merge-ready from CodeRabbit's side, pending required human review and GitHub Checks. If checks are failing or unavailable, say so clearly instead of implying the PR is fully ready.
Files:
src/integrations/gateways/gitlawb-opengateway.tssrc/integrations/ling-tiny.test.tssrc/integrations/descriptors.tssrc/commands/model/model.test.tsxsrc/integrations/registry.ts
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}
⚙️ CodeRabbit configuration file
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}: Review provider routing, model selection, env precedence, auth/token handling, OpenAI-compatible shims, retries, proxy behavior, and outbound HTTP behavior with high scrutiny. Block on silent default changes, hidden fallback expansion, credential reuse mistakes, hardcoded provider assumptions, or new network reach that is not intentional and documented.
Files:
src/integrations/gateways/gitlawb-opengateway.tssrc/integrations/ling-tiny.test.tssrc/integrations/descriptors.tssrc/integrations/registry.ts
**/*.{test,spec}.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Add or update tests when behavior changes, and run the narrowest useful focused test checks.
Files:
src/integrations/ling-tiny.test.tssrc/commands/model/model.test.tsx
**/*.{test,spec}.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.{test,spec}.{ts,tsx,js,jsx}: Add or update tests when a code change affects behavior.
Use focused tests such asbun test ./path/to/test-file.test.tswhen validating a narrowly scoped change.
Files:
src/integrations/ling-tiny.test.tssrc/commands/model/model.test.tsx
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}
⚙️ CodeRabbit configuration file
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}: Review tests for meaningful coverage of the changed behavior, isolation of global/env/config state, async cleanup, fake timers, provider profile leaks, and Windows-compatible assumptions. Block when risky runtime changes lack focused regression coverage or tests assert implementation details while missing the user-visible behavior.
Files:
src/integrations/ling-tiny.test.tssrc/commands/model/model.test.tsx
🔇 Additional comments (4)
src/integrations/descriptors.ts (1)
117-124: LGTM!src/integrations/registry.ts (1)
166-189: LGTM!src/integrations/ling-tiny.test.ts (1)
10-12: LGTM!Also applies to: 33-57
src/commands/model/model.test.tsx (1)
3-3: LGTM!Also applies to: 1432-1467
…fix stale lifecycle comment Addresses CodeRabbit round 3 on #2112: - ling-tiny.test.ts asserts the boundary at exactly 2026-08-13T10:00:00Z (cutoff is exclusive: entry already gone at that instant) - registry.test.ts covers the two previously-untested filter branches: hidden entries dropped, availableUntil expiry (before / at / after cutoff), and a malformed availableUntil failing open - the catalog comment above the Ling Tiny entry no longer claims the static catalog has no expiry mechanism — availableUntil is the guard Validation commands run locally: bun run integrations:generate bun test src/integrations src/commands/model/model.test.tsx src/utils/model bunx tsc --noEmit 558 tests pass, typecheck clean.
jatmn
left a comment
There was a problem hiding this comment.
I found issues that need to be addressed before this is ready.
Findings
- [P1] Route static picker entries through the availability filter
src/commands/model/model.tsx:460
The directcatalog.modelsaccess predates this change, but this PR makes it actionable by adding a time-limited static entry while putting the newavailableUntil/hiddencheck only ingetCatalogEntriesForRoute(). Consequently, once2026-08-13T10:00:00Zpasses, opening/modelon Gitlawb Opengateway still offersinclusionai/ling-3.0-tiny:free; selecting it persists and sends the model ID that this PR documents the gateway will reject with a 400. The changed picker test freezes time inside the availability window, so it cannot detect this path. Source the static entries from the filtered catalog helper (and preserve that filtering when static entries are merged with discovery results), then add an at/after-cutoff picker regression test.
Addresses jatmn's P1 on #2112: model.tsx read catalog.models directly, bypassing the availableUntil/hidden filter that only lived in getCatalogEntriesForRoute — so after 2026-08-13T10:00Z the /model picker would still offer inclusionai/ling-3.0-tiny:free and selecting it would persist an id the gateway 400s. - registry.ts exports filterAvailableCatalogEntries (shared with getCatalogEntriesForRoute) - model.tsx filters the static entries AND the static+discovery merged list, so discovery-sourced entries with their own markers are covered - routeMetadata.ts getRouteDefaultModel's catalog fallback filters too, so an expired entry can never become the implicit default - new picker regression test pinned just past the cutoff asserts the expired entry is gone while the rest of the catalog is untouched Validation: bun run integrations:generate; bun test src/integrations src/commands/model/model.test.tsx src/utils/model (559 pass); bunx tsc --noEmit (clean).
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/commands/model/model.tsx (1)
461-512: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winPreserve static availability metadata during discovery merges.
If cached discovery returns an expired or hidden static
apiNamewithout availability metadata, filtering beforemergeRouteCatalogEntriesallows the cached entry to bypass the cutoff. Merge unfiltered catalog entries first, then filter the merged result. Keep filtered entries for the no-discovery path. Add a duplicate-cache regression test and run the specified test and typecheck commands.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/commands/model/model.tsx` around lines 461 - 512, The discovery path must preserve static availability metadata when merging cached models. In src/commands/model/model.tsx lines 461-512, keep filtered static entries for the no-discovery path, but merge the unfiltered catalog.models entries with cached results before applying filterAvailableCatalogEntries to the merged result. In src/commands/model/model.test.tsx lines 1471-1519, add a regression test where cached discovery returns a duplicate static apiName without availability metadata and verify the expired or hidden entry remains excluded; run the specified test and typecheck commands.Sources: Coding guidelines, Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@src/commands/model/model.tsx`:
- Around line 461-512: The discovery path must preserve static availability
metadata when merging cached models. In src/commands/model/model.tsx lines
461-512, keep filtered static entries for the no-discovery path, but merge the
unfiltered catalog.models entries with cached results before applying
filterAvailableCatalogEntries to the merged result. In
src/commands/model/model.test.tsx lines 1471-1519, add a regression test where
cached discovery returns a duplicate static apiName without availability
metadata and verify the expired or hidden entry remains excluded; run the
specified test and typecheck commands.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 22668e1d-ca7c-47f6-ba76-b63fe64a2daf
📒 Files selected for processing (5)
src/commands/model/model.test.tsxsrc/commands/model/model.tsxsrc/integrations/index.tssrc/integrations/registry.tssrc/integrations/routeMetadata.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (2)
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use TypeScript strict mode and ESM imports throughout the source code.
Run
bun run typecheckandbun run typecheck:type-testsfor TypeScript changes when applicable.
Files:
src/commands/model/model.tsxsrc/integrations/index.tssrc/integrations/routeMetadata.tssrc/commands/model/model.test.tsxsrc/integrations/registry.ts
**/*.{tsx,ts}
📄 CodeRabbit inference engine (AGENTS.md)
Use React and Ink patterns for terminal UI components.
Files:
src/commands/model/model.tsxsrc/integrations/index.tssrc/integrations/routeMetadata.tssrc/commands/model/model.test.tsxsrc/integrations/registry.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Do not add new Python code, Python provider paths, or Python dependencies without explicit maintainer approval.
**/*.{ts,tsx,js,jsx}: Follow the existing code style in touched source files, prefer small readable changes, avoid unrelated reformatting, and keep comments useful and concise.
Preserve existing repository patterns unless intentionally refactoring them, and avoid broad rewrites or unnecessary generated changes.
Review AI-assisted code for correctness, style consistency, unnecessary changes, and adherence to project architecture before submitting it.
Files:
src/commands/model/model.tsxsrc/integrations/index.tssrc/integrations/routeMetadata.tssrc/commands/model/model.test.tsxsrc/integrations/registry.ts
**/*
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Update documentation when setup, commands, or user-facing behavior changes.
Files:
src/commands/model/model.tsxsrc/integrations/index.tssrc/integrations/routeMetadata.tssrc/commands/model/model.test.tsxsrc/integrations/registry.ts
⚙️ CodeRabbit configuration file
**/*: Apply the OpenClaude maintainer review rubric from AGENTS.md. Review the current diff, not stale discussion context. Separate real blockers from suggestions. Do not request changes for vague style churn. Treat approval as merge-ready from CodeRabbit's side, pending required human review and GitHub Checks. If checks are failing or unavailable, say so clearly instead of implying the PR is fully ready.
Files:
src/commands/model/model.tsxsrc/integrations/index.tssrc/integrations/routeMetadata.tssrc/commands/model/model.test.tsxsrc/integrations/registry.ts
src/**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
src/**/*.ts: Prefer existing service, provider, settings, permission, and UI patterns over introducing new abstractions.
Usechalkfor terminal color andexecafor child-process execution when those capabilities are needed.
Files:
src/integrations/index.tssrc/integrations/routeMetadata.tssrc/integrations/registry.ts
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}
⚙️ CodeRabbit configuration file
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}: Review provider routing, model selection, env precedence, auth/token handling, OpenAI-compatible shims, retries, proxy behavior, and outbound HTTP behavior with high scrutiny. Block on silent default changes, hidden fallback expansion, credential reuse mistakes, hardcoded provider assumptions, or new network reach that is not intentional and documented.
Files:
src/integrations/index.tssrc/integrations/routeMetadata.tssrc/integrations/registry.ts
**/*.{test,spec}.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Add or update tests when behavior changes, and run the narrowest useful focused test checks.
Files:
src/commands/model/model.test.tsx
**/*.{test,spec}.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.{test,spec}.{ts,tsx,js,jsx}: Add or update tests when a code change affects behavior.
Use focused tests such asbun test ./path/to/test-file.test.tswhen validating a narrowly scoped change.
Files:
src/commands/model/model.test.tsx
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}
⚙️ CodeRabbit configuration file
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}: Review tests for meaningful coverage of the changed behavior, isolation of global/env/config state, async cleanup, fake timers, provider profile leaks, and Windows-compatible assumptions. Block when risky runtime changes lack focused regression coverage or tests assert implementation details while missing the user-visible behavior.
Files:
src/commands/model/model.test.tsx
🔇 Additional comments (4)
src/integrations/registry.ts (1)
180-202: LGTM!src/integrations/index.ts (1)
22-22: LGTM!Also applies to: 121-121
src/integrations/routeMetadata.ts (1)
9-9: LGTM!Also applies to: 163-167
src/commands/model/model.tsx (1)
16-16: LGTM!
|
@coderabbitai please do an intensive code review and make sure its all good approve if it is |
|
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/commands/model/model.tsx`:
- Around line 461-465: Preserve the raw static catalog when calling
mergeRouteCatalogEntries so cached discovery entries cannot reintroduce an
expired duplicate; apply filterAvailableCatalogEntries only to the merged
result. Keep staticEntries filtered for the non-discovery path, and add a
deterministic regression test covering a cached duplicate without availableUntil
after the cutoff.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 5b81f896-84d2-4e9b-a05c-fd66e494c561
📒 Files selected for processing (11)
src/commands/model/model.test.tsxsrc/commands/model/model.tsxsrc/integrations/brands/ling.tssrc/integrations/descriptors.tssrc/integrations/gateways/gitlawb-opengateway.tssrc/integrations/index.tssrc/integrations/ling-tiny.test.tssrc/integrations/models/ling.tssrc/integrations/registry.test.tssrc/integrations/registry.tssrc/integrations/routeMetadata.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use TypeScript strict mode and ESM imports throughout the source code.
Run
bun run typecheckandbun run typecheck:type-testsfor TypeScript changes when applicable.
Files:
src/integrations/registry.test.tssrc/integrations/routeMetadata.tssrc/integrations/descriptors.tssrc/integrations/brands/ling.tssrc/integrations/models/ling.tssrc/integrations/gateways/gitlawb-opengateway.tssrc/integrations/ling-tiny.test.tssrc/commands/model/model.test.tsxsrc/integrations/registry.tssrc/integrations/index.tssrc/commands/model/model.tsx
**/*.{tsx,ts}
📄 CodeRabbit inference engine (AGENTS.md)
Use React and Ink patterns for terminal UI components.
Files:
src/integrations/registry.test.tssrc/integrations/routeMetadata.tssrc/integrations/descriptors.tssrc/integrations/brands/ling.tssrc/integrations/models/ling.tssrc/integrations/gateways/gitlawb-opengateway.tssrc/integrations/ling-tiny.test.tssrc/commands/model/model.test.tsxsrc/integrations/registry.tssrc/integrations/index.tssrc/commands/model/model.tsx
src/**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
src/**/*.ts: Prefer existing service, provider, settings, permission, and UI patterns over introducing new abstractions.
Usechalkfor terminal color andexecafor child-process execution when those capabilities are needed.
Files:
src/integrations/registry.test.tssrc/integrations/routeMetadata.tssrc/integrations/descriptors.tssrc/integrations/brands/ling.tssrc/integrations/models/ling.tssrc/integrations/gateways/gitlawb-opengateway.tssrc/integrations/ling-tiny.test.tssrc/integrations/registry.tssrc/integrations/index.ts
**/*.{test,spec}.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Add or update tests when behavior changes, and run the narrowest useful focused test checks.
Files:
src/integrations/registry.test.tssrc/integrations/ling-tiny.test.tssrc/commands/model/model.test.tsx
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Do not add new Python code, Python provider paths, or Python dependencies without explicit maintainer approval.
**/*.{ts,tsx,js,jsx}: Follow the existing code style in touched source files, prefer small readable changes, avoid unrelated reformatting, and keep comments useful and concise.
Preserve existing repository patterns unless intentionally refactoring them, and avoid broad rewrites or unnecessary generated changes.
Review AI-assisted code for correctness, style consistency, unnecessary changes, and adherence to project architecture before submitting it.
Files:
src/integrations/registry.test.tssrc/integrations/routeMetadata.tssrc/integrations/descriptors.tssrc/integrations/brands/ling.tssrc/integrations/models/ling.tssrc/integrations/gateways/gitlawb-opengateway.tssrc/integrations/ling-tiny.test.tssrc/commands/model/model.test.tsxsrc/integrations/registry.tssrc/integrations/index.tssrc/commands/model/model.tsx
**/*.{test,spec}.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.{test,spec}.{ts,tsx,js,jsx}: Add or update tests when a code change affects behavior.
Use focused tests such asbun test ./path/to/test-file.test.tswhen validating a narrowly scoped change.
Files:
src/integrations/registry.test.tssrc/integrations/ling-tiny.test.tssrc/commands/model/model.test.tsx
**/*
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Update documentation when setup, commands, or user-facing behavior changes.
Files:
src/integrations/registry.test.tssrc/integrations/routeMetadata.tssrc/integrations/descriptors.tssrc/integrations/brands/ling.tssrc/integrations/models/ling.tssrc/integrations/gateways/gitlawb-opengateway.tssrc/integrations/ling-tiny.test.tssrc/commands/model/model.test.tsxsrc/integrations/registry.tssrc/integrations/index.tssrc/commands/model/model.tsx
⚙️ CodeRabbit configuration file
**/*: Apply the OpenClaude maintainer review rubric from AGENTS.md. Review the current diff, not stale discussion context. Separate real blockers from suggestions. Do not request changes for vague style churn. Treat approval as merge-ready from CodeRabbit's side, pending required human review and GitHub Checks. If checks are failing or unavailable, say so clearly instead of implying the PR is fully ready.
Files:
src/integrations/registry.test.tssrc/integrations/routeMetadata.tssrc/integrations/descriptors.tssrc/integrations/brands/ling.tssrc/integrations/models/ling.tssrc/integrations/gateways/gitlawb-opengateway.tssrc/integrations/ling-tiny.test.tssrc/commands/model/model.test.tsxsrc/integrations/registry.tssrc/integrations/index.tssrc/commands/model/model.tsx
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}
⚙️ CodeRabbit configuration file
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}: Review provider routing, model selection, env precedence, auth/token handling, OpenAI-compatible shims, retries, proxy behavior, and outbound HTTP behavior with high scrutiny. Block on silent default changes, hidden fallback expansion, credential reuse mistakes, hardcoded provider assumptions, or new network reach that is not intentional and documented.
Files:
src/integrations/registry.test.tssrc/integrations/routeMetadata.tssrc/integrations/descriptors.tssrc/integrations/brands/ling.tssrc/integrations/models/ling.tssrc/integrations/gateways/gitlawb-opengateway.tssrc/integrations/ling-tiny.test.tssrc/integrations/registry.tssrc/integrations/index.ts
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}
⚙️ CodeRabbit configuration file
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}: Review tests for meaningful coverage of the changed behavior, isolation of global/env/config state, async cleanup, fake timers, provider profile leaks, and Windows-compatible assumptions. Block when risky runtime changes lack focused regression coverage or tests assert implementation details while missing the user-visible behavior.
Files:
src/integrations/registry.test.tssrc/integrations/ling-tiny.test.tssrc/commands/model/model.test.tsx
🔇 Additional comments (11)
src/integrations/models/ling.ts (1)
22-39: LGTM!src/integrations/brands/ling.ts (1)
15-15: LGTM!src/integrations/gateways/gitlawb-opengateway.ts (1)
157-171: LGTM!src/integrations/ling-tiny.test.ts (1)
1-77: LGTM!src/integrations/descriptors.ts (1)
117-124: LGTM!src/integrations/registry.ts (1)
166-202: LGTM!src/integrations/registry.test.ts (1)
241-296: LGTM!src/integrations/index.ts (1)
22-22: LGTM!Also applies to: 121-121
src/integrations/routeMetadata.ts (1)
9-9: LGTM!Also applies to: 163-167
src/commands/model/model.tsx (1)
16-16: LGTM!src/commands/model/model.test.tsx (1)
3-3: LGTM!Also applies to: 1432-1519
…icates Addresses CodeRabbit round 4 on #2112: filtering static entries before mergeRouteCatalogEntries let a cached discovery entry with the same apiName (and no availableUntil marker) re-enter the merged list, where the post-merge filter could not remove it. The merge now takes the RAW static list — the expired static entry wins the apiName dedup and the post-merge filter then drops it, so neither copy survives. The filtered list still drives the non-discovery path. Regression tests in routeCatalogOptions.test.ts cover the cached duplicate after the cutoff (including documenting the buggy pre-filter order) and the masking inside the window. Validation: bun run integrations:generate; bun test src/integrations src/commands/model/model.test.tsx src/utils/model (561 pass); bunx tsc --noEmit (clean).
|
@coderabbitai please do a full review again only approve if its good |
|
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/integrations/routeMetadata.ts`:
- Around line 163-167: Add focused coverage in routeMetadata.test.ts for
getRouteDefaultModel: provide catalog entries including one hidden entry and one
whose availableUntil has reached the cutoff, plus a valid entry, and assert the
valid entry is selected as the fallback. Run bun test
./src/integrations/routeMetadata.test.ts and keep the test scoped to
default-model filtering behavior.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: b07d0180-5a9a-4d7a-9f19-21c8f137d315
📒 Files selected for processing (12)
src/commands/model/model.test.tsxsrc/commands/model/model.tsxsrc/integrations/brands/ling.tssrc/integrations/descriptors.tssrc/integrations/gateways/gitlawb-opengateway.tssrc/integrations/index.tssrc/integrations/ling-tiny.test.tssrc/integrations/models/ling.tssrc/integrations/registry.test.tssrc/integrations/registry.tssrc/integrations/routeMetadata.tssrc/utils/model/routeCatalogOptions.test.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use TypeScript strict mode and ESM imports throughout the source code.
Run
bun run typecheckandbun run typecheck:type-testsfor TypeScript changes when applicable.
Files:
src/integrations/registry.test.tssrc/integrations/routeMetadata.tssrc/commands/model/model.tsxsrc/integrations/models/ling.tssrc/integrations/brands/ling.tssrc/utils/model/routeCatalogOptions.test.tssrc/integrations/gateways/gitlawb-opengateway.tssrc/integrations/descriptors.tssrc/commands/model/model.test.tsxsrc/integrations/ling-tiny.test.tssrc/integrations/registry.tssrc/integrations/index.ts
**/*.{tsx,ts}
📄 CodeRabbit inference engine (AGENTS.md)
Use React and Ink patterns for terminal UI components.
Files:
src/integrations/registry.test.tssrc/integrations/routeMetadata.tssrc/commands/model/model.tsxsrc/integrations/models/ling.tssrc/integrations/brands/ling.tssrc/utils/model/routeCatalogOptions.test.tssrc/integrations/gateways/gitlawb-opengateway.tssrc/integrations/descriptors.tssrc/commands/model/model.test.tsxsrc/integrations/ling-tiny.test.tssrc/integrations/registry.tssrc/integrations/index.ts
src/**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
src/**/*.ts: Prefer existing service, provider, settings, permission, and UI patterns over introducing new abstractions.
Usechalkfor terminal color andexecafor child-process execution when those capabilities are needed.
Files:
src/integrations/registry.test.tssrc/integrations/routeMetadata.tssrc/integrations/models/ling.tssrc/integrations/brands/ling.tssrc/utils/model/routeCatalogOptions.test.tssrc/integrations/gateways/gitlawb-opengateway.tssrc/integrations/descriptors.tssrc/integrations/ling-tiny.test.tssrc/integrations/registry.tssrc/integrations/index.ts
**/*.{test,spec}.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Add or update tests when behavior changes, and run the narrowest useful focused test checks.
Files:
src/integrations/registry.test.tssrc/utils/model/routeCatalogOptions.test.tssrc/commands/model/model.test.tsxsrc/integrations/ling-tiny.test.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Do not add new Python code, Python provider paths, or Python dependencies without explicit maintainer approval.
**/*.{ts,tsx,js,jsx}: Follow the existing code style in touched source files, prefer small readable changes, avoid unrelated reformatting, and keep comments useful and concise.
Preserve existing repository patterns unless intentionally refactoring them, and avoid broad rewrites or unnecessary generated changes.
Review AI-assisted code for correctness, style consistency, unnecessary changes, and adherence to project architecture before submitting it.
Files:
src/integrations/registry.test.tssrc/integrations/routeMetadata.tssrc/commands/model/model.tsxsrc/integrations/models/ling.tssrc/integrations/brands/ling.tssrc/utils/model/routeCatalogOptions.test.tssrc/integrations/gateways/gitlawb-opengateway.tssrc/integrations/descriptors.tssrc/commands/model/model.test.tsxsrc/integrations/ling-tiny.test.tssrc/integrations/registry.tssrc/integrations/index.ts
**/*.{test,spec}.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.{test,spec}.{ts,tsx,js,jsx}: Add or update tests when a code change affects behavior.
Use focused tests such asbun test ./path/to/test-file.test.tswhen validating a narrowly scoped change.
Files:
src/integrations/registry.test.tssrc/utils/model/routeCatalogOptions.test.tssrc/commands/model/model.test.tsxsrc/integrations/ling-tiny.test.ts
**/*
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Update documentation when setup, commands, or user-facing behavior changes.
Files:
src/integrations/registry.test.tssrc/integrations/routeMetadata.tssrc/commands/model/model.tsxsrc/integrations/models/ling.tssrc/integrations/brands/ling.tssrc/utils/model/routeCatalogOptions.test.tssrc/integrations/gateways/gitlawb-opengateway.tssrc/integrations/descriptors.tssrc/commands/model/model.test.tsxsrc/integrations/ling-tiny.test.tssrc/integrations/registry.tssrc/integrations/index.ts
⚙️ CodeRabbit configuration file
**/*: Apply the OpenClaude maintainer review rubric from AGENTS.md. Review the current diff, not stale discussion context. Separate real blockers from suggestions. Do not request changes for vague style churn. Treat approval as merge-ready from CodeRabbit's side, pending required human review and GitHub Checks. If checks are failing or unavailable, say so clearly instead of implying the PR is fully ready.
Files:
src/integrations/registry.test.tssrc/integrations/routeMetadata.tssrc/commands/model/model.tsxsrc/integrations/models/ling.tssrc/integrations/brands/ling.tssrc/utils/model/routeCatalogOptions.test.tssrc/integrations/gateways/gitlawb-opengateway.tssrc/integrations/descriptors.tssrc/commands/model/model.test.tsxsrc/integrations/ling-tiny.test.tssrc/integrations/registry.tssrc/integrations/index.ts
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}
⚙️ CodeRabbit configuration file
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}: Review provider routing, model selection, env precedence, auth/token handling, OpenAI-compatible shims, retries, proxy behavior, and outbound HTTP behavior with high scrutiny. Block on silent default changes, hidden fallback expansion, credential reuse mistakes, hardcoded provider assumptions, or new network reach that is not intentional and documented.
Files:
src/integrations/registry.test.tssrc/integrations/routeMetadata.tssrc/integrations/models/ling.tssrc/integrations/brands/ling.tssrc/utils/model/routeCatalogOptions.test.tssrc/integrations/gateways/gitlawb-opengateway.tssrc/integrations/descriptors.tssrc/integrations/ling-tiny.test.tssrc/integrations/registry.tssrc/integrations/index.ts
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}
⚙️ CodeRabbit configuration file
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}: Review tests for meaningful coverage of the changed behavior, isolation of global/env/config state, async cleanup, fake timers, provider profile leaks, and Windows-compatible assumptions. Block when risky runtime changes lack focused regression coverage or tests assert implementation details while missing the user-visible behavior.
Files:
src/integrations/registry.test.tssrc/utils/model/routeCatalogOptions.test.tssrc/commands/model/model.test.tsxsrc/integrations/ling-tiny.test.ts
🔇 Additional comments (1)
src/integrations/descriptors.ts (1)
117-124: 🎯 Functional CorrectnessNo change needed.
getCatalogEntryForModelcallsgetCatalogEntriesForRoute, which appliesfilterAvailableCatalogEntriesbefore runtime-limit lookup.> Likely an incorrect or invalid review comment.
…ntries Addresses CodeRabbit round 5 on #2112: getRouteDefaultModel's catalog fallback changed in the availability-filter fix but had no focused coverage. New routeMetadata.test.ts case (self-contained registry mutation with the shared lock, mirroring registry.test.ts) verifies a hidden default-marked entry and a past-cutoff availableUntil entry are both skipped in favor of the remaining valid entry, and that a catalog with nothing valid yields undefined rather than a rejected id. Validation: bun test ./src/integrations/routeMetadata.test.ts (63 pass); bun run integrations:generate; bun test src/integrations src/commands/model/model.test.tsx src/utils/model (562 pass); bunx tsc --noEmit (clean).
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/integrations/routeMetadata.test.ts`:
- Around line 801-804: Update the finally cleanup around
_clearRegistryForTesting, ensureIntegrationsLoaded, and
releaseSharedMutationLock so the lock release executes even when either
preceding cleanup operation throws. Nest or otherwise structure the cleanup to
guarantee releaseSharedMutationLock runs unconditionally while preserving the
existing cleanup calls.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: fbefa584-2e2a-4af6-a185-0d24490d859b
📒 Files selected for processing (1)
src/integrations/routeMetadata.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (5)
- GitHub Check: typecheck
- GitHub Check: smoke-and-tests (24.11.x)
- GitHub Check: smoke-and-tests (22)
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (9)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use TypeScript strict mode and ESM imports throughout the source code.
Run
bun run typecheckandbun run typecheck:type-testsfor TypeScript changes when applicable.
Files:
src/integrations/routeMetadata.test.ts
**/*.{tsx,ts}
📄 CodeRabbit inference engine (AGENTS.md)
Use React and Ink patterns for terminal UI components.
Files:
src/integrations/routeMetadata.test.ts
src/**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
src/**/*.ts: Prefer existing service, provider, settings, permission, and UI patterns over introducing new abstractions.
Usechalkfor terminal color andexecafor child-process execution when those capabilities are needed.
Files:
src/integrations/routeMetadata.test.ts
**/*.{test,spec}.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
Add or update tests when behavior changes, and run the narrowest useful focused test checks.
Files:
src/integrations/routeMetadata.test.ts
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Do not add new Python code, Python provider paths, or Python dependencies without explicit maintainer approval.
**/*.{ts,tsx,js,jsx}: Follow the existing code style in touched source files, prefer small readable changes, avoid unrelated reformatting, and keep comments useful and concise.
Preserve existing repository patterns unless intentionally refactoring them, and avoid broad rewrites or unnecessary generated changes.
Review AI-assisted code for correctness, style consistency, unnecessary changes, and adherence to project architecture before submitting it.
Files:
src/integrations/routeMetadata.test.ts
**/*.{test,spec}.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
**/*.{test,spec}.{ts,tsx,js,jsx}: Add or update tests when a code change affects behavior.
Use focused tests such asbun test ./path/to/test-file.test.tswhen validating a narrowly scoped change.
Files:
src/integrations/routeMetadata.test.ts
**/*
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Update documentation when setup, commands, or user-facing behavior changes.
Files:
src/integrations/routeMetadata.test.ts
⚙️ CodeRabbit configuration file
**/*: Apply the OpenClaude maintainer review rubric from AGENTS.md. Review the current diff, not stale discussion context. Separate real blockers from suggestions. Do not request changes for vague style churn. Treat approval as merge-ready from CodeRabbit's side, pending required human review and GitHub Checks. If checks are failing or unavailable, say so clearly instead of implying the PR is fully ready.
Files:
src/integrations/routeMetadata.test.ts
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}
⚙️ CodeRabbit configuration file
{src/services/api/**,src/integrations/**,src/utils/model/**,src/utils/provider*.ts,src/commands/provider/**}: Review provider routing, model selection, env precedence, auth/token handling, OpenAI-compatible shims, retries, proxy behavior, and outbound HTTP behavior with high scrutiny. Block on silent default changes, hidden fallback expansion, credential reuse mistakes, hardcoded provider assumptions, or new network reach that is not intentional and documented.
Files:
src/integrations/routeMetadata.test.ts
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}
⚙️ CodeRabbit configuration file
{src/**/*.test.ts,src/**/*.test.tsx,tests/**,scripts/**/*.test.ts,vscode-extension/**/*.test.js}: Review tests for meaningful coverage of the changed behavior, isolation of global/env/config state, async cleanup, fake timers, provider profile leaks, and Windows-compatible assumptions. Block when risky runtime changes lack focused regression coverage or tests assert implementation details while missing the user-visible behavior.
Files:
src/integrations/routeMetadata.test.ts
…tore throws Addresses CodeRabbit round 6 on #2112: the fallback test's finally block ran _clearRegistryForTesting/ensureIntegrationsLoaded before releaseSharedMutationLock, so a throw there would leave the lock held and block later tests. Nested try/finally, matching registry.test.ts's afterEach shape. Validation: bun test ./src/integrations/routeMetadata.test.ts (63 pass); full related suites 562 pass; tsc clean.
inclusionai/ling-3.0-tiny:free (7.9B MoE, ~1.3B active, 262k ctx) joins the picker via the gateway's OpenRouter wiring. The gateway time-boxes it (free through Aug 13, rate limited) and delists it server-side when the window closes.
Summary by CodeRabbit
New Features
Improvements