openzoo 0.9.6 → 0.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/models.js +18 -3
- package/package.json +1 -1
package/lib/models.js
CHANGED
|
@@ -137,12 +137,27 @@ export const ALIAS_IDS = [
|
|
|
137
137
|
'deepseek-chat', 'deepseek-reasoner', 'qwen-max', 'llama-3.3-70b',
|
|
138
138
|
];
|
|
139
139
|
|
|
140
|
-
/**
|
|
140
|
+
/**
|
|
141
|
+
* Merge alias rows into a /v1/models payload without duplicating real ids.
|
|
142
|
+
* Each alias inherits context_length and pricing from the model it RESOLVES
|
|
143
|
+
* to — a harness sizing its corpus off "gpt-4o" gets the real ceiling of the
|
|
144
|
+
* model that will actually serve it, not a blank.
|
|
145
|
+
*/
|
|
141
146
|
export function augmentModelList(payload) {
|
|
142
147
|
const data = Array.isArray(payload?.data) ? payload.data : [];
|
|
143
148
|
const have = new Set(data.map((m) => m.id));
|
|
144
|
-
const
|
|
145
|
-
|
|
149
|
+
const ids = data.map((m) => m.id);
|
|
150
|
+
const aliases = ALIAS_IDS.filter((id) => !have.has(id)).map((id) => {
|
|
151
|
+
const target = data.find((m) => m.id === resolveModel(id, ids));
|
|
152
|
+
return {
|
|
153
|
+
id,
|
|
154
|
+
object: 'model',
|
|
155
|
+
owned_by: 'openzoo-alias',
|
|
156
|
+
...(target?.context_length ? { context_length: target.context_length, context_window: target.context_window ?? target.context_length } : {}),
|
|
157
|
+
...(target?.pricing ? { pricing: target.pricing } : {}),
|
|
158
|
+
...(target ? { served_by: target.id } : {}),
|
|
159
|
+
};
|
|
160
|
+
});
|
|
146
161
|
return { ...payload, object: payload?.object || 'list', data: [...data, ...aliases] };
|
|
147
162
|
}
|
|
148
163
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openzoo",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.7",
|
|
4
4
|
"description": "Local x402-paying proxy + MCP server for openzoo.fun — point any OpenAI-compatible harness (Cursor, Claude Code, aider, SDKs) at localhost and it pays per call from a local burner wallet. Solana and Base rails live; Robinhood experimental.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|