MCPcopy Index your code
hub / github.com/BlockRunAI/ClawRouter / buildProxyModelList

Function buildProxyModelList

src/proxy.ts:1351–1365  ·  view source on GitHub ↗
(
  createdAt: number = Math.floor(Date.now() / 1000),
)

Source from the content-addressed store, hash-verified

1349 * `/v1/models` stays open for API-level discovery.
1350 */
1351export function buildProxyModelList(
1352 createdAt: number = Math.floor(Date.now() / 1000),
1353): ModelListEntry[] {
1354 const seen = new Set<string>();
1355 return OPENCLAW_MODELS.filter((model) => {
1356 if (seen.has(model.id)) return false;
1357 seen.add(model.id);
1358 return true;
1359 }).map((model) => ({
1360 id: model.id,
1361 object: "model",
1362 created: createdAt,
1363 owned_by: model.id.includes("/") ? (model.id.split("/")[0] ?? "blockrun") : "blockrun",
1364 }));
1365}
1366
1367/**
1368 * Merge partial routing config overrides with defaults.

Callers 2

startProxyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected