Files
plugins/packages/agentcompass/package.json
T
Akiiwa 6de02a0ab3 agentcompass 0.1.4: canonicalModel resolves a multi-prefix model id by its last segment (#751)
agentcompass 0.1.4: canonicalModel tries the id with its first prefix removed, then its lowercase, then the last path segment and its lowercase, so a multi-prefix id such as openrouter/minimax/MiniMax-M3 resolves to its alias (minimax-m3). An id no alias knows keeps its old key.

Reviewed at 2adb5439 on mote (Bun 1.4.2, Node 22.22.0, fresh HOME): agentcompass bun test and node --test 44/44; bun scripts/check.mjs (package and whole repo) exit 0; repo root bun test 6244 pass, 0 fail. The old code and three of the four new lookups, each broken by hand, turned test 9.7 red; dropping the lowercase of the prefix-stripped id, which was already on main, stayed green. PR CI green on attempt 1. Not tried: a real routed request through a live gateway.
2026-11-06 17:08:24 +08:00

47 lines
1.8 KiB
JSON

{
"name": "@magpie-community/gateway-agentcompass",
"version": "0.1.4",
"description": "Intent, multi-dimensional capability, Model DNA, subscription quota opportunity-cost, and session-affinity routing plugin for Magpie, powered by AgentCompass.",
"type": "module",
"main": "./src/index.js",
"exports": {
".": "./src/index.js",
"./server": "./src/index.js",
"./hooks": "./src/hooks.js",
"./middleware": "./src/middleware.js",
"./allocator": "./src/allocator.js",
"./continuity": "./src/continuity.js",
"./quota": "./src/quota.js",
"./profiler": "./src/profiler-core.js",
"./catalog": "./src/catalog.js"
},
"magpie": {
"name": "AgentCompass",
"icon": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2NCA2NCIgZmlsbD0ibm9uZSI+PGNpcmNsZSBjeD0iMzIiIGN5PSIzMiIgcj0iMjgiIHN0cm9rZT0iIzNCODJGNiIgc3Ryb2tlLXdpZHRoPSI0IiBmaWxsPSIjMEYxNzJBIi8+PGNpcmNsZSBjeD0iMzIiIGN5PSIzMiIgcj0iMjIiIHN0cm9rZT0iIzYwQTVGQSIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1kYXNoYXJyYXk9IjMgMyIvPjxwb2x5Z29uIHBvaW50cz0iMzIsMTIgMzgsMzIgMzIsMjggMjYsMzIiIGZpbGw9IiNFRjQ0NDQiLz48cG9seWdvbiBwb2ludHM9IjMyLDUyIDM4LDMyIDMyLDM2IDI2LDMyIiBmaWxsPSIjRTJFOEYwIi8+PGNpcmNsZSBjeD0iMzIiIGN5PSIzMiIgcj0iMy41IiBmaWxsPSIjRjhGQUZDIi8+PC9zdmc+",
"middleware": "./src/middleware.js",
"options": {
"routeAllModels": false,
"injectProtocolEffort": true
}
},
"scripts": {
"test": "node --test test/router.test.mjs"
},
"keywords": [
"magpie",
"magpie-middleware",
"magpie-routing",
"routing",
"load-balancing",
"llm-gateway",
"agentcompass"
],
"homepage": "https://github.com/akiiwa-games/AgentCompass",
"repository": {
"type": "git",
"url": "https://github.com/magpie-community/plugins.git",
"directory": "packages/agentcompass"
},
"license": "MIT"
}