gitlab-ai-provider 6.15.1 → 6.17.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 CHANGED
@@ -2,6 +2,16 @@
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.17.0 (2026-09-23)
6
+
7
+ - Merge branch 'feat/discovery-cache-key' into 'main' ([e407898](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/e407898))
8
+ - feat(discovery): scope workflow discovery cache by optional cacheKey ([e9aac8c](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/e9aac8c))
9
+
10
+ ## 6.16.0 (2026-09-22)
11
+
12
+ - Merge branch 'feature-add-opus-5-5' into 'main' ([c1a5f12](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/c1a5f12))
13
+ - feat(models): add Claude Opus 5.5 model mappings ([6b6efe4](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/6b6efe4))
14
+
5
15
  ## <small>6.15.1 (2026-09-09)</small>
6
16
 
7
17
  - Merge branch 'fix/agent-platform-model-discovery' into 'main' ([98c1fa7](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/98c1fa7))
package/README.md CHANGED
@@ -123,6 +123,7 @@ const customModel = gitlab.agenticChat('duo-chat-opus-4-5', {
123
123
  | ------------------------ | --------- | ---------------------------- |
124
124
  | `duo-chat-fable-5-1` | Anthropic | `claude-fable-5-1` |
125
125
  | `duo-chat-fable-5` | Anthropic | `claude-fable-5` |
126
+ | `duo-chat-opus-5-5` | Anthropic | `claude-opus-5-5` |
126
127
  | `duo-chat-opus-5` | Anthropic | `claude-opus-5` |
127
128
  | `duo-chat-opus-4-8` | Anthropic | `claude-opus-4-8` |
128
129
  | `duo-chat-opus-4-7` | Anthropic | `claude-opus-4-7` |
package/dist/index.d.mts CHANGED
@@ -334,7 +334,13 @@ interface ModelCacheEntry {
334
334
  declare class GitLabModelCache {
335
335
  private readonly filePath;
336
336
  private readonly key;
337
- constructor(workDir: string, instanceUrl?: string);
337
+ /**
338
+ * @param workDir - Workspace directory the cache entry belongs to
339
+ * @param instanceUrl - GitLab instance URL
340
+ * @param scope - Optional extra key component (e.g. an account identifier) that keeps
341
+ * entries for different accounts on the same workspace and instance apart
342
+ */
343
+ constructor(workDir: string, instanceUrl?: string, scope?: string);
338
344
  private readAll;
339
345
  private writeAll;
340
346
  /**
@@ -1871,6 +1877,12 @@ interface WorkflowDiscoveryConfig {
1871
1877
  }
1872
1878
  interface WorkflowDiscoveryOptions {
1873
1879
  workingDirectory: string;
1880
+ /**
1881
+ * Optional opaque identifier of the account the discovery runs for. When set, cached
1882
+ * results are scoped to it so switching accounts on the same workspace and instance
1883
+ * never returns another account's models. The value is hashed before being stored.
1884
+ */
1885
+ cacheKey?: string;
1874
1886
  }
1875
1887
  interface WorkflowDiscoveryResult {
1876
1888
  models: DiscoveredWorkflowModel[];
package/dist/index.d.ts CHANGED
@@ -334,7 +334,13 @@ interface ModelCacheEntry {
334
334
  declare class GitLabModelCache {
335
335
  private readonly filePath;
336
336
  private readonly key;
337
- constructor(workDir: string, instanceUrl?: string);
337
+ /**
338
+ * @param workDir - Workspace directory the cache entry belongs to
339
+ * @param instanceUrl - GitLab instance URL
340
+ * @param scope - Optional extra key component (e.g. an account identifier) that keeps
341
+ * entries for different accounts on the same workspace and instance apart
342
+ */
343
+ constructor(workDir: string, instanceUrl?: string, scope?: string);
338
344
  private readAll;
339
345
  private writeAll;
340
346
  /**
@@ -1871,6 +1877,12 @@ interface WorkflowDiscoveryConfig {
1871
1877
  }
1872
1878
  interface WorkflowDiscoveryOptions {
1873
1879
  workingDirectory: string;
1880
+ /**
1881
+ * Optional opaque identifier of the account the discovery runs for. When set, cached
1882
+ * results are scoped to it so switching accounts on the same workspace and instance
1883
+ * never returns another account's models. The value is hashed before being stored.
1884
+ */
1885
+ cacheKey?: string;
1874
1886
  }
1875
1887
  interface WorkflowDiscoveryResult {
1876
1888
  models: DiscoveredWorkflowModel[];
package/dist/index.js CHANGED
@@ -1602,6 +1602,7 @@ var MODEL_MAPPINGS = {
1602
1602
  // Anthropic models
1603
1603
  "duo-chat-fable-5-1": { provider: "anthropic", model: "claude-fable-5-1" },
1604
1604
  "duo-chat-fable-5": { provider: "anthropic", model: "claude-fable-5" },
1605
+ "duo-chat-opus-5-5": { provider: "anthropic", model: "claude-opus-5-5" },
1605
1606
  "duo-chat-opus-5": { provider: "anthropic", model: "claude-opus-5" },
1606
1607
  "duo-chat-opus-4-8": { provider: "anthropic", model: "claude-opus-4-8" },
1607
1608
  "duo-chat-opus-4-7": { provider: "anthropic", model: "claude-opus-4-7" },
@@ -1665,6 +1666,7 @@ var MODEL_MAPPINGS = {
1665
1666
  model: "claude_sonnet_4_5_20250929"
1666
1667
  },
1667
1668
  "duo-workflow-sonnet-5": { provider: "workflow", model: "claude_sonnet_5" },
1669
+ "duo-workflow-opus-5-5": { provider: "workflow", model: "claude_opus_5_5" },
1668
1670
  "duo-workflow-opus-5": { provider: "workflow", model: "claude_opus_5" },
1669
1671
  "duo-workflow-sonnet-4-6": { provider: "workflow", model: "claude_sonnet_4_6" },
1670
1672
  "duo-workflow-opus-4-5": {
@@ -2771,7 +2773,7 @@ var import_node_async_hooks = require("async_hooks");
2771
2773
  var import_isomorphic_ws = __toESM(require("isomorphic-ws"));
2772
2774
 
2773
2775
  // src/version.ts
2774
- var VERSION = true ? "6.15.0" : "0.0.0-dev";
2776
+ var VERSION = true ? "6.16.0" : "0.0.0-dev";
2775
2777
 
2776
2778
  // src/gitlab-workflow-client.ts
2777
2779
  var WS_CONNECT_TIMEOUT_MS = 3e4;
@@ -3654,16 +3656,23 @@ function getCacheFilePath() {
3654
3656
  const cacheHome = process.env.XDG_CACHE_HOME || path3.join(os.homedir(), ".cache");
3655
3657
  return path3.join(cacheHome, "opencode", "gitlab-workflow-model-cache.json");
3656
3658
  }
3657
- function computeCacheKey(workDir, instanceUrl) {
3659
+ function computeCacheKey(workDir, instanceUrl, scope) {
3658
3660
  const normalizedUrl = (instanceUrl || "https://gitlab.com").replace(/\/$/, "");
3659
- return crypto.createHash("sha256").update(`${workDir}\0${normalizedUrl}`).digest("hex").slice(0, 12);
3661
+ const input = scope ? `${workDir}\0${normalizedUrl}\0${scope}` : `${workDir}\0${normalizedUrl}`;
3662
+ return crypto.createHash("sha256").update(input).digest("hex").slice(0, 12);
3660
3663
  }
3661
3664
  var GitLabModelCache = class {
3662
3665
  filePath;
3663
3666
  key;
3664
- constructor(workDir, instanceUrl) {
3667
+ /**
3668
+ * @param workDir - Workspace directory the cache entry belongs to
3669
+ * @param instanceUrl - GitLab instance URL
3670
+ * @param scope - Optional extra key component (e.g. an account identifier) that keeps
3671
+ * entries for different accounts on the same workspace and instance apart
3672
+ */
3673
+ constructor(workDir, instanceUrl, scope) {
3665
3674
  this.filePath = getCacheFilePath();
3666
- this.key = computeCacheKey(workDir, instanceUrl);
3675
+ this.key = computeCacheKey(workDir, instanceUrl, scope);
3667
3676
  }
3668
3677
  readAll() {
3669
3678
  try {
@@ -5931,7 +5940,11 @@ async function buildModels(discovered, project) {
5931
5940
  return { models, project };
5932
5941
  }
5933
5942
  async function discoverWorkflowModels(config, options) {
5934
- const cache = new GitLabModelCache(options.workingDirectory, config.instanceUrl);
5943
+ const cache = new GitLabModelCache(
5944
+ options.workingDirectory,
5945
+ config.instanceUrl,
5946
+ options.cacheKey
5947
+ );
5935
5948
  if (!cache.isDiscoveryExpired()) {
5936
5949
  const entry = cache.load();
5937
5950
  if (entry?.discovery) {