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/dist/index.mjs CHANGED
@@ -1523,6 +1523,7 @@ var MODEL_MAPPINGS = {
1523
1523
  // Anthropic models
1524
1524
  "duo-chat-fable-5-1": { provider: "anthropic", model: "claude-fable-5-1" },
1525
1525
  "duo-chat-fable-5": { provider: "anthropic", model: "claude-fable-5" },
1526
+ "duo-chat-opus-5-5": { provider: "anthropic", model: "claude-opus-5-5" },
1526
1527
  "duo-chat-opus-5": { provider: "anthropic", model: "claude-opus-5" },
1527
1528
  "duo-chat-opus-4-8": { provider: "anthropic", model: "claude-opus-4-8" },
1528
1529
  "duo-chat-opus-4-7": { provider: "anthropic", model: "claude-opus-4-7" },
@@ -1586,6 +1587,7 @@ var MODEL_MAPPINGS = {
1586
1587
  model: "claude_sonnet_4_5_20250929"
1587
1588
  },
1588
1589
  "duo-workflow-sonnet-5": { provider: "workflow", model: "claude_sonnet_5" },
1590
+ "duo-workflow-opus-5-5": { provider: "workflow", model: "claude_opus_5_5" },
1589
1591
  "duo-workflow-opus-5": { provider: "workflow", model: "claude_opus_5" },
1590
1592
  "duo-workflow-sonnet-4-6": { provider: "workflow", model: "claude_sonnet_4_6" },
1591
1593
  "duo-workflow-opus-4-5": {
@@ -2692,7 +2694,7 @@ import { AsyncResource } from "async_hooks";
2692
2694
  import WebSocket from "isomorphic-ws";
2693
2695
 
2694
2696
  // src/version.ts
2695
- var VERSION = true ? "6.15.0" : "0.0.0-dev";
2697
+ var VERSION = true ? "6.16.0" : "0.0.0-dev";
2696
2698
 
2697
2699
  // src/gitlab-workflow-client.ts
2698
2700
  var WS_CONNECT_TIMEOUT_MS = 3e4;
@@ -3575,16 +3577,23 @@ function getCacheFilePath() {
3575
3577
  const cacheHome = process.env.XDG_CACHE_HOME || path3.join(os.homedir(), ".cache");
3576
3578
  return path3.join(cacheHome, "opencode", "gitlab-workflow-model-cache.json");
3577
3579
  }
3578
- function computeCacheKey(workDir, instanceUrl) {
3580
+ function computeCacheKey(workDir, instanceUrl, scope) {
3579
3581
  const normalizedUrl = (instanceUrl || "https://gitlab.com").replace(/\/$/, "");
3580
- return crypto.createHash("sha256").update(`${workDir}\0${normalizedUrl}`).digest("hex").slice(0, 12);
3582
+ const input = scope ? `${workDir}\0${normalizedUrl}\0${scope}` : `${workDir}\0${normalizedUrl}`;
3583
+ return crypto.createHash("sha256").update(input).digest("hex").slice(0, 12);
3581
3584
  }
3582
3585
  var GitLabModelCache = class {
3583
3586
  filePath;
3584
3587
  key;
3585
- constructor(workDir, instanceUrl) {
3588
+ /**
3589
+ * @param workDir - Workspace directory the cache entry belongs to
3590
+ * @param instanceUrl - GitLab instance URL
3591
+ * @param scope - Optional extra key component (e.g. an account identifier) that keeps
3592
+ * entries for different accounts on the same workspace and instance apart
3593
+ */
3594
+ constructor(workDir, instanceUrl, scope) {
3586
3595
  this.filePath = getCacheFilePath();
3587
- this.key = computeCacheKey(workDir, instanceUrl);
3596
+ this.key = computeCacheKey(workDir, instanceUrl, scope);
3588
3597
  }
3589
3598
  readAll() {
3590
3599
  try {
@@ -5852,7 +5861,11 @@ async function buildModels(discovered, project) {
5852
5861
  return { models, project };
5853
5862
  }
5854
5863
  async function discoverWorkflowModels(config, options) {
5855
- const cache = new GitLabModelCache(options.workingDirectory, config.instanceUrl);
5864
+ const cache = new GitLabModelCache(
5865
+ options.workingDirectory,
5866
+ config.instanceUrl,
5867
+ options.cacheKey
5868
+ );
5856
5869
  if (!cache.isDiscoveryExpired()) {
5857
5870
  const entry = cache.load();
5858
5871
  if (entry?.discovery) {