Skip to content

APR-207: Scaffold MCP plugin interface for 3rd-party model data sources#54

Open
JacobSampson wants to merge 1 commit into
mainfrom
APR-207/scaffold-mcp-plugin-interface
Open

APR-207: Scaffold MCP plugin interface for 3rd-party model data sources#54
JacobSampson wants to merge 1 commit into
mainfrom
APR-207/scaffold-mcp-plugin-interface

Conversation

@JacobSampson

Copy link
Copy Markdown
Contributor

Summary

  • Introduces @aprovan/model-sources — a new workspace package that defines the MCP plugin interface contract for external model performance data sources (Artificial Analysis, Chatbot Arena, Hugging Face Leaderboard, etc.)
  • Provides a clear hook point (noopSelectionHook / createRegistryHook) where APR-205 (model selection engine) will inject plugin data when ready — no plugin data enters selection decisions yet
  • Includes a reference ArtificialAnalysisPlugin stub so future implementors have a concrete example to follow

Changes

  • packages/model-sources/src/types.ts: ModelDataPlugin interface (listModels, getModel, getRecommendations), supporting types (ModelInfo, ModelPricing, ModelBenchmarks, RecommendationQuery, ModelRecommendation, PluginConfig, ComplexityTier)
  • packages/model-sources/src/registry.ts: ModelSourceRegistry class and registry singleton; aggregates across multiple plugins, deduplicates by model ID, skips failing plugins gracefully
  • packages/model-sources/src/selection-hook.ts: ModelSelectionHook type, noopSelectionHook (default no-op), createRegistryHook factory (activates real plugin queries for APR-205)
  • packages/model-sources/src/plugins/artificial-analysis.ts: Reference stub with static model data; TODO comments mark exactly where real API calls go when APR-205 activates
  • packages/model-sources/src/__tests__/: 38 unit tests covering registry, plugin, and hook surfaces

Test Plan

  • pnpm --filter @aprovan/model-sources test — 38 tests pass (3 test files)
  • pnpm --filter @aprovan/model-sources typecheck — zero type errors
  • pnpm --filter @aprovan/model-sources build — ESM + CJS + .d.ts outputs generated successfully
  • pnpm --filter @aprovan/model-sources lint — blocked by pre-existing typescript-eslint missing from @aprovan/eslint-config (affects all packages including devtools; not introduced by this PR)

Closes: APR-207

🤖 Generated with Claude Code

…(APR-207)

Add @aprovan/model-sources package that defines the plugin interface
contract for external model performance data sources (Artificial Analysis,
Chatbot Arena, etc.) and wires a hook point for the upcoming model
selection engine (APR-205).

- ModelDataPlugin interface: listModels() / getModel() / getRecommendations()
- ModelSourceRegistry: manages registered plugins, aggregates results
- noopSelectionHook / createRegistryHook: APR-205 integration site
- ArtificialAnalysisPlugin: reference stub implementation (no live API calls)
- 38 unit tests covering all public surfaces

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant