claudish 7.12.2 → 7.12.3
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/index.js +26 -3
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -581,7 +581,7 @@ var init_onepassword_config = __esm(() => {
|
|
|
581
581
|
});
|
|
582
582
|
|
|
583
583
|
// src/version.ts
|
|
584
|
-
var VERSION = "7.12.
|
|
584
|
+
var VERSION = "7.12.3";
|
|
585
585
|
|
|
586
586
|
// src/logger.ts
|
|
587
587
|
var exports_logger = {};
|
|
@@ -31403,10 +31403,15 @@ var init_codex_api_format = __esm(() => {
|
|
|
31403
31403
|
return value;
|
|
31404
31404
|
}
|
|
31405
31405
|
acceptsXhigh() {
|
|
31406
|
-
|
|
31406
|
+
const m = this.modelId.toLowerCase();
|
|
31407
|
+
return /codex.*max/.test(m) || /gpt-5\.6/.test(m);
|
|
31408
|
+
}
|
|
31409
|
+
acceptsMax() {
|
|
31410
|
+
return /gpt-5\.6/.test(this.modelId.toLowerCase());
|
|
31407
31411
|
}
|
|
31408
31412
|
isCodex51Plus() {
|
|
31409
|
-
|
|
31413
|
+
const m = this.modelId.toLowerCase();
|
|
31414
|
+
return /gpt-5\.[1-9].*codex/.test(m) || /gpt-5\.6/.test(m);
|
|
31410
31415
|
}
|
|
31411
31416
|
clampCodexEffort(level) {
|
|
31412
31417
|
switch (level) {
|
|
@@ -31421,6 +31426,8 @@ var init_codex_api_format = __esm(() => {
|
|
|
31421
31426
|
case "xhigh":
|
|
31422
31427
|
return this.acceptsXhigh() ? "xhigh" : "high";
|
|
31423
31428
|
case "max":
|
|
31429
|
+
if (this.acceptsMax())
|
|
31430
|
+
return "max";
|
|
31424
31431
|
return this.acceptsXhigh() ? "xhigh" : "high";
|
|
31425
31432
|
default:
|
|
31426
31433
|
return "medium";
|
|
@@ -41858,6 +41865,9 @@ var init_vertex_oauth = __esm(() => {
|
|
|
41858
41865
|
});
|
|
41859
41866
|
|
|
41860
41867
|
// src/providers/provider-profiles.ts
|
|
41868
|
+
function requiresResponsesApi(modelName) {
|
|
41869
|
+
return /^gpt-5\.6/.test(modelName.toLowerCase());
|
|
41870
|
+
}
|
|
41861
41871
|
function createHandlerForProvider(ctx) {
|
|
41862
41872
|
const profile = PROVIDER_PROFILES[ctx.provider.name] ?? getRuntimeProfiles().get(ctx.provider.name);
|
|
41863
41873
|
if (!profile) {
|
|
@@ -41920,6 +41930,18 @@ var init_provider_profiles = __esm(() => {
|
|
|
41920
41930
|
};
|
|
41921
41931
|
openaiProfile = {
|
|
41922
41932
|
createHandler(ctx) {
|
|
41933
|
+
if (requiresResponsesApi(ctx.modelName)) {
|
|
41934
|
+
const responsesProvider = { ...ctx.provider, apiPath: "/v1/responses" };
|
|
41935
|
+
const transport2 = new OpenAIProviderTransport(responsesProvider, ctx.modelName, ctx.apiKey);
|
|
41936
|
+
const adapter2 = new CodexAPIFormat(ctx.modelName);
|
|
41937
|
+
const handler2 = new ComposedHandler(transport2, ctx.targetModel, ctx.modelName, ctx.port, {
|
|
41938
|
+
adapter: adapter2,
|
|
41939
|
+
tokenStrategy: "delta-aware",
|
|
41940
|
+
...ctx.sharedOpts
|
|
41941
|
+
});
|
|
41942
|
+
log(`[Proxy] Created OpenAI handler (Responses API composed): ${ctx.modelName}`);
|
|
41943
|
+
return handler2;
|
|
41944
|
+
}
|
|
41923
41945
|
const transport = new OpenAIProviderTransport(ctx.provider, ctx.modelName, ctx.apiKey);
|
|
41924
41946
|
const adapter = new OpenAIAPIFormat(ctx.modelName);
|
|
41925
41947
|
const handler = new ComposedHandler(transport, ctx.targetModel, ctx.modelName, ctx.port, {
|
|
@@ -43955,6 +43977,7 @@ ${plan.hint}` : `[Route] ${plan.reason}`;
|
|
|
43955
43977
|
app.post("/v1/messages", async (c) => {
|
|
43956
43978
|
try {
|
|
43957
43979
|
const body = await c.req.json();
|
|
43980
|
+
log(`[RequestMeta] model=${body.model} output_config=${JSON.stringify(body.output_config) ?? "(none)"} metadata=${JSON.stringify(body.metadata) ?? "(none)"} anthropic-beta=${c.req.header("anthropic-beta") ?? "(none)"}`);
|
|
43958
43981
|
const handler = await getHandlerForRequest(body.model);
|
|
43959
43982
|
return handler.handle(c, body);
|
|
43960
43983
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claudish",
|
|
3
|
-
"version": "7.12.
|
|
3
|
+
"version": "7.12.3",
|
|
4
4
|
"description": "Run Claude Code with any model - OpenRouter, Ollama, LM Studio & local models",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
"ai"
|
|
61
61
|
],
|
|
62
62
|
"optionalDependencies": {
|
|
63
|
-
"@claudish/magmux-darwin-arm64": "7.12.
|
|
64
|
-
"@claudish/magmux-darwin-x64": "7.12.
|
|
65
|
-
"@claudish/magmux-linux-arm64": "7.12.
|
|
66
|
-
"@claudish/magmux-linux-x64": "7.12.
|
|
63
|
+
"@claudish/magmux-darwin-arm64": "7.12.3",
|
|
64
|
+
"@claudish/magmux-darwin-x64": "7.12.3",
|
|
65
|
+
"@claudish/magmux-linux-arm64": "7.12.3",
|
|
66
|
+
"@claudish/magmux-linux-x64": "7.12.3"
|
|
67
67
|
},
|
|
68
68
|
"author": "Jack Rudenko <i@madappgang.com>",
|
|
69
69
|
"license": "MIT",
|