gitlab-ai-provider 6.7.0 → 6.8.0
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/CHANGELOG.md +12 -0
- package/dist/gitlab-ai-provider-6.8.0.tgz +0 -0
- package/dist/index.js +14 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/gitlab-ai-provider-6.7.0.tgz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## 6.8.0 (2026-05-28)
|
|
6
|
+
|
|
7
|
+
- Merge branch 'feat/add-opus-4-8-model-mapping' into 'main' ([3ba92de](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/3ba92de))
|
|
8
|
+
- feat: add Claude Opus 4.8 model mapping ([be321b3](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/be321b3))
|
|
9
|
+
|
|
10
|
+
## <small>6.7.1 (2026-05-26)</small>
|
|
11
|
+
|
|
12
|
+
- Merge branch 'fix/anthropic-cache-token-counting' into 'main' ([298e2d0](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/298e2d0))
|
|
13
|
+
- build: regenerate dist for anthropic cache token fix ([627d6f7](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/627d6f7))
|
|
14
|
+
- test(anthropic): add streaming test for cache token handling ([6033350](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/6033350))
|
|
15
|
+
- fix(anthropic): include cache tokens in input token total ([699af0a](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/699af0a))
|
|
16
|
+
|
|
5
17
|
## 6.7.0 (2026-05-18)
|
|
6
18
|
|
|
7
19
|
- Merge branch 'feat/add-gpt-5-5-model-mapping' into 'main' ([10e84d1](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/10e84d1))
|
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -474,14 +474,15 @@ ${message.content}` : message.content;
|
|
|
474
474
|
return { unified, raw: stopReason ?? void 0 };
|
|
475
475
|
}
|
|
476
476
|
createUsage(params) {
|
|
477
|
-
const
|
|
477
|
+
const inputNoCache = params?.inputTotal;
|
|
478
478
|
const outputTotal = params?.outputTotal;
|
|
479
479
|
const cacheRead = params?.cacheRead;
|
|
480
480
|
const cacheWrite = params?.cacheWrite;
|
|
481
|
+
const inputTotal = inputNoCache != null ? inputNoCache + (cacheRead ?? 0) + (cacheWrite ?? 0) : void 0;
|
|
481
482
|
return {
|
|
482
483
|
inputTokens: {
|
|
483
484
|
total: inputTotal,
|
|
484
|
-
noCache:
|
|
485
|
+
noCache: inputNoCache,
|
|
485
486
|
cacheRead,
|
|
486
487
|
cacheWrite
|
|
487
488
|
},
|
|
@@ -609,12 +610,13 @@ ${message.content}` : message.content;
|
|
|
609
610
|
switch (event.type) {
|
|
610
611
|
case "message_start":
|
|
611
612
|
if (event.message.usage) {
|
|
613
|
+
const msgUsage = event.message.usage;
|
|
612
614
|
usage = self.createUsage({
|
|
613
|
-
inputTotal:
|
|
615
|
+
inputTotal: msgUsage.input_tokens,
|
|
614
616
|
outputTotal: usage.outputTokens.total,
|
|
615
617
|
outputReasoning: usage.outputTokens.reasoning,
|
|
616
|
-
cacheRead:
|
|
617
|
-
cacheWrite:
|
|
618
|
+
cacheRead: msgUsage.cache_read_input_tokens,
|
|
619
|
+
cacheWrite: msgUsage.cache_creation_input_tokens,
|
|
618
620
|
raw: usage.raw
|
|
619
621
|
});
|
|
620
622
|
}
|
|
@@ -688,12 +690,13 @@ ${message.content}` : message.content;
|
|
|
688
690
|
}
|
|
689
691
|
case "message_delta":
|
|
690
692
|
if (event.usage) {
|
|
693
|
+
const deltaUsage = event.usage;
|
|
691
694
|
usage = self.createUsage({
|
|
692
|
-
inputTotal: usage.inputTokens.
|
|
693
|
-
outputTotal:
|
|
695
|
+
inputTotal: usage.inputTokens.noCache,
|
|
696
|
+
outputTotal: deltaUsage.output_tokens,
|
|
694
697
|
outputReasoning: usage.outputTokens.reasoning,
|
|
695
|
-
cacheRead: usage.inputTokens.cacheRead,
|
|
696
|
-
cacheWrite: usage.inputTokens.cacheWrite,
|
|
698
|
+
cacheRead: deltaUsage.cache_read_input_tokens ?? usage.inputTokens.cacheRead,
|
|
699
|
+
cacheWrite: deltaUsage.cache_creation_input_tokens ?? usage.inputTokens.cacheWrite,
|
|
697
700
|
raw: usage.raw
|
|
698
701
|
});
|
|
699
702
|
}
|
|
@@ -811,6 +814,7 @@ var import_openai = __toESM(require("openai"));
|
|
|
811
814
|
// src/model-mappings.ts
|
|
812
815
|
var MODEL_MAPPINGS = {
|
|
813
816
|
// Anthropic models
|
|
817
|
+
"duo-chat-opus-4-8": { provider: "anthropic", model: "claude-opus-4-8" },
|
|
814
818
|
"duo-chat-opus-4-7": { provider: "anthropic", model: "claude-opus-4-7" },
|
|
815
819
|
"duo-chat-opus-4-6": { provider: "anthropic", model: "claude-opus-4-6" },
|
|
816
820
|
"duo-chat-sonnet-4-6": { provider: "anthropic", model: "claude-sonnet-4-6" },
|
|
@@ -1681,7 +1685,7 @@ var GitLabOpenAILanguageModel = class {
|
|
|
1681
1685
|
var import_isomorphic_ws = __toESM(require("isomorphic-ws"));
|
|
1682
1686
|
|
|
1683
1687
|
// src/version.ts
|
|
1684
|
-
var VERSION = true ? "6.
|
|
1688
|
+
var VERSION = true ? "6.7.1" : "0.0.0-dev";
|
|
1685
1689
|
|
|
1686
1690
|
// src/gitlab-workflow-types.ts
|
|
1687
1691
|
var WorkflowType = /* @__PURE__ */ ((WorkflowType2) => {
|