Hide internal and legacy Copilot models from Pi/omp catalogs - #766
Conversation
Copilot's /models endpoint returns internal agents (exec-agent-*, copilot-search-*, trajectory-compaction) and dated GPT-3.5/4 snapshots that never appear in its own picker. omp drops the picker/policy flags, so filter these ids by name. omp's 71-model Copilot list drops to the 53 models in its picker set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe RPC model conversion now filters selected internal, trajectory-compaction, and legacy or dated model IDs for GitHub Copilot. A test checks that supported Copilot IDs and an OpenAI model remain in the results. ChangesGitHub Copilot model filtering
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change filters selected internal and legacy Copilot IDs while the added test retains supported Copilot and OpenAI models; no confirmed user-facing mismatch remains. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to Removed saved selections can automatically resolve to a different service for new conversations. This is conditional on another service being available. Existing conversations retain their original routing, and no actual disclosure was established. Retained concerns
Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
@nwoolls thanks you. Looks good to me :) |
Copilot's /models endpoint returns internal agents (exec-agent-, copilot-search-, trajectory-compaction) and dated GPT-3.5/4 snapshots that never appear in its own picker. omp drops the picker/policy flags, so filter these ids by name. omp's 71-model Copilot list drops to the 53 models in its picker set.
What changed
modelsFromRpcDatanow skipsgithub-copilotmodels whose ids match a short list of internal and dated-snapshot patterns (isHiddenCopilotModelinpiProtocol.ts). It applies to both omp and Pi, since they share the same model-list code; other providers' models (e.g.openai/gpt-4o-mini) are unaffected.Why
With omp, MonoCode's model picker listed all 71 Copilot models, including internal agents and old dated snapshots that aren't meant to be chosen and may fail when used. Hermes avoids this because Copilot's own agent returns only the models the account can use. omp gets its list from the same Copilot /models endpoint but drops the picker and policy flags, so MonoCode can't tell which models are hidden or disabled.
This change hides the models that are never in Copilot's picker. It doesn't hide models the account can't use (e.g. ones disabled by org policy); that needs omp to pass Copilot's policy and billing fields through
get_available_models. I didn't filter on omp'scostfield. It's a fixed public price table, not Copilot billing, socost == 0mostly means "no price data". Filtering on it would hide usable models like Sonnet 4.6 and GPT-5.4.UI
Before
After
Checklist
npm run checkSummary by CodeRabbit