OmO agent metadata + scalable model picker
Problem
- Agent lists are hard to understand with only a name and a minimal description.
- Model selection dialogs don’t scale when they dump a long-tail “other” bucket of 100–200+ models.
Context / Trigger Conditions
- You have an agent→model assignment UI.
- Users complain that the picker is a flat list / “other” bucket.
- You already have (or can fetch) upstream agent definitions (system prompt metadata) and want to enrich local UI.
Solution
1) Merge two sources of truth
- Local static profile (fast, curated UX fields):
AGENT_PROFILESinlib/constants.js.- Add fields like:
access(read-only|limited|write),usage[],caveats[], plus existingpreferred[],minContext.
- Add fields like:
- Upstream parsed agent metadata (authoritative intent):
lib/core/agents.js.- Fetches TypeScript from
code-yeongyu/oh-my-opencodeand parsesdescription, role/behaviors/constraints. - Infer an
accessmode from common constraint language (read-only/plan-only), but prefer the local curatedAGENT_PROFILES.accesswhen present.
- Fetches TypeScript from
Expose merged metadata via the API:
- In
lib/server.jsGET /api/agentsandGET /api/agents/:name, attach:summary(curated description)access,usage[],caveats[],preferred[]recommendedModels[](top N) plusrecommendedModel(single best)
2) Replace “other models” with a picker that scales
In the WebUI model selector modal:
- Add an inline search box and lightweight filters:
- provider select
- min context select
- capability chips (reasoning/image/pdf/thinking/fast)
Render results in sections:
- Recommended for this agent (top N IDs from API; map to model objects in the client)
- In use in this config (models currently assigned to any agent)
- All models (N) grouped by provider (optionally capped to avoid huge renders)
This removes the UX anti-pattern of a giant “other” bucket while still offering full access.
Verification
GET /api/agentsreturns merged fields (summary,access,usage,caveats,preferred,recommendedModels).- WebUI agent cards show richer summaries and caveats.
- WebUI “Change model” modal supports search + filters and groups results (no flat “other” dump).
- Basic runtime check:
node -e "require('./lib/constants'); require('./lib/core/agents'); require('./lib/server');".
Example
- User clicks Change Model on an agent card.
- Modal shows agent summary + requirement hints.
- User types
claudeand selects provideranthropic. - Results narrow instantly; recommended models are pinned at the top.
Notes
- Keep the UI dependency-free (plain DOM + event listeners + re-render) to match this repo’s zero-npm approach.
- Cap “All models” rendering (e.g., first 120) and prompt users to refine filters for large catalogs.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.