MCPcopy Create free account
hub / github.com/CommonstackAI/UncommonRoute / buildModels

Function buildModels

openclaw-plugin/src/index.js:137–153  ·  view source on GitHub ↗
(baseUrl)

Source from the content-addressed store, hash-verified

135// ── Helpers ──────────────────────────────────────────────────────────
136
137function buildModels(baseUrl) {
138 return {
139 baseUrl,
140 api: "openai-completions",
141 apiKey: "uncommon-route-local-proxy",
142 models: MODELS.map((m) => ({
143 id: m.id,
144 name: m.name,
145 api: "openai-completions",
146 reasoning: m.reasoning,
147 input: ["text"],
148 cost: { input: m.input, output: m.output, cacheRead: 0, cacheWrite: 0 },
149 contextWindow: m.ctx,
150 maxTokens: m.max,
151 })),
152 };
153}
154
155async function waitForHealth(port, timeoutMs = HEALTH_TIMEOUT_MS) {
156 const url = `http://127.0.0.1:${port}/health`;

Callers 2

modelsFunction · 0.85
registerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected