CASOL-2: Move combo capabilities to shared module + add branch tests#2156
Open
alt-coder wants to merge 5 commits into
Open
CASOL-2: Move combo capabilities to shared module + add branch tests#2156alt-coder wants to merge 5 commits into
alt-coder wants to merge 5 commits into
Conversation
…ichment - next.config.mjs: NINEROUTER_BASE_PATH -> Next basePath - dashboardGuard.js: redirectWithBasePath preserves sub-path on redirects - models/route.js + info/route.js: Litellm-compatible model_info, dbUnavailable flag, upstream capability cache - lib/upstreamModelMetadata.js: fetch/parse/cache upstream model metadata Co-Authored-By: Claude <noreply@anthropic.com>
# Conflicts: # src/app/api/v1/models/route.js
scripts/deploy.sh: build (NINEROUTER_BASE_PATH), refresh 9router-deploy from .next/standalone + loose open-sse + custom-server.js + the easily-forgotten .next/static assets, then restart the systemd user service. Includes readiness poll + retrying smoke test. DB at 9router-data untouched. Force-added past .gitignore deploy*.sh rule (server-specific, not for upstream). Co-Authored-By: Claude <noreply@anthropic.com>
- Move getComboCapabilities / aggregateCapabilities from route.js to open-sse/providers/capabilities.js so tests can import the real impl. - Drop the inline copy in combo-capabilities.test.js; import the real functions instead. This fixes the false-confidence test gap flagged by all three critics. - Add test cases for thinkingFormat unanimity/divergence, thinkingRange conservative bounds, single-element input, empty/non-array input, non-finite numeric filtering, slashless model strings, whitespace filtering, and round-trip with getCapabilitiesForModel. - Replace Math.min(...vals) / Math.max(...vals) with reduce() so massive combo lists cannot blow the argument-stack limit (latent footgun flagged by critic1, masked by current small combos). - Reformat thinkingFormat / thinkingRange branches to explicitly assign null on failure instead of relying on the spread of DEFAULT (preserves same observable contract, clearer intent). Refs CASOL-2.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Move
aggregateCapabilitiesandgetComboCapabilitiesfromsrc/app/api/v1/models/route.jstoopen-sse/providers/capabilities.jsso unit tests can import the real implementation instead of re-implementing aggregation logic.Changes
aggregateCapabilities,getComboCapabilitiesTest Results
Evidence
a753e09node --checkpassed (3 files)Closes
Closes CASOL-2