@gajae-code/ai 0.7.6 → 0.7.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/package.json +2 -2
- package/src/model-thinking.ts +7 -1
- package/src/models.ts +4 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@gajae-code/ai",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.7",
|
|
5
5
|
"description": "Unified LLM API with automatic model discovery and provider configuration",
|
|
6
6
|
"homepage": "https://gaebal-gajae.dev",
|
|
7
7
|
"author": "Yeachan-Heo",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@anthropic-ai/sdk": "^0.94.0",
|
|
45
45
|
"@bufbuild/protobuf": "^2.12.0",
|
|
46
|
-
"@gajae-code/utils": "0.7.
|
|
46
|
+
"@gajae-code/utils": "0.7.7",
|
|
47
47
|
"openai": "^6.36.0",
|
|
48
48
|
"partial-json": "^0.1.7",
|
|
49
49
|
"zod": "4.4.3"
|
package/src/model-thinking.ts
CHANGED
|
@@ -454,7 +454,13 @@ function inferGeneratedApplyPatchToolType(
|
|
|
454
454
|
|
|
455
455
|
function applyGpt55ContextWindow(model: ApiModel<Api>, parsedModel: OpenAIModel): boolean {
|
|
456
456
|
if (parsedModel.variant === "base" && semverEqual(parsedModel.version, "5.5")) {
|
|
457
|
-
|
|
457
|
+
// The first-party OpenAI GPT-5.5 model advertises a 1M total window, but
|
|
458
|
+
// the OpenAI code backend request path still enforces the smaller prompt
|
|
459
|
+
// budget. GJC's `contextWindow` is the usable prompt/input cap, not the
|
|
460
|
+
// marketing total window; using 1M here delays compaction and makes the UI
|
|
461
|
+
// promise space that `/responses/compact`/agent turns cannot actually use.
|
|
462
|
+
model.contextWindow =
|
|
463
|
+
model.provider === "openai-codex" || model.api === "openai-codex-responses" ? 272_000 : 1_000_000;
|
|
458
464
|
return true;
|
|
459
465
|
}
|
|
460
466
|
return false;
|
package/src/models.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { enrichModelThinking } from "./model-thinking";
|
|
1
|
+
import { applyGeneratedModelPolicies, enrichModelThinking } from "./model-thinking";
|
|
2
2
|
import MODELS from "./models.json" with { type: "json" };
|
|
3
3
|
import type { Api, KnownProvider, Model, Usage } from "./types";
|
|
4
4
|
import { isClaudeForcedToolChoiceIncapableModelId } from "./utils/tool-choice-capability";
|
|
@@ -47,7 +47,9 @@ function applyBundledCompatDefaults(model: Model<Api>): Model<Api> {
|
|
|
47
47
|
compat: { ...(normalized.compat ?? {}), toolChoiceSupport: "auto" } as Model<Api>["compat"],
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
const policyModels = [normalized];
|
|
51
|
+
applyGeneratedModelPolicies(policyModels);
|
|
52
|
+
return policyModels[0] ?? normalized;
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
export type GeneratedProvider = keyof typeof MODELS;
|