@blockrun/clawrouter 0.9.31 → 0.9.32

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/dist/cli.js CHANGED
@@ -1689,7 +1689,7 @@ var BLOCKRUN_MODELS = [
1689
1689
  },
1690
1690
  {
1691
1691
  id: "claude-sonnet-4",
1692
- name: "Claude Sonnet 4",
1692
+ name: "Claude Sonnet 4.6",
1693
1693
  inputPrice: 3,
1694
1694
  outputPrice: 15,
1695
1695
  contextWindow: 2e5,
@@ -1699,7 +1699,7 @@ var BLOCKRUN_MODELS = [
1699
1699
  },
1700
1700
  {
1701
1701
  id: "claude-opus-4",
1702
- name: "Claude Opus 4",
1702
+ name: "Claude Opus 4.6",
1703
1703
  inputPrice: 15,
1704
1704
  outputPrice: 75,
1705
1705
  contextWindow: 2e5,
@@ -4052,6 +4052,19 @@ function buildModelPricing() {
4052
4052
  }
4053
4053
  return map;
4054
4054
  }
4055
+ function buildProxyModelList(createdAt = Math.floor(Date.now() / 1e3)) {
4056
+ const seen = /* @__PURE__ */ new Set();
4057
+ return OPENCLAW_MODELS.filter((model) => {
4058
+ if (seen.has(model.id)) return false;
4059
+ seen.add(model.id);
4060
+ return true;
4061
+ }).map((model) => ({
4062
+ id: model.id,
4063
+ object: "model",
4064
+ created: createdAt,
4065
+ owned_by: model.id.includes("/") ? model.id.split("/")[0] ?? "blockrun" : "blockrun"
4066
+ }));
4067
+ }
4055
4068
  function mergeRoutingConfig(overrides) {
4056
4069
  if (!overrides) return DEFAULT_ROUTING_CONFIG;
4057
4070
  return {
@@ -4177,12 +4190,7 @@ async function startProxy(options) {
4177
4190
  return;
4178
4191
  }
4179
4192
  if (req.url === "/v1/models" && req.method === "GET") {
4180
- const models = BLOCKRUN_MODELS.filter((m) => m.id !== "blockrun/auto").map((m) => ({
4181
- id: m.id,
4182
- object: "model",
4183
- created: Math.floor(Date.now() / 1e3),
4184
- owned_by: m.id.split("/")[0] || "unknown"
4185
- }));
4193
+ const models = buildProxyModelList();
4186
4194
  res.writeHead(200, { "Content-Type": "application/json" });
4187
4195
  res.end(JSON.stringify({ object: "list", data: models }));
4188
4196
  return;