@salesforce/sfdx-agent-sdk 0.28.0 → 0.30.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
@@ -3,6 +3,15 @@
3
3
  All notable changes to `@salesforce/sfdx-agent-sdk` are documented in this file.
4
4
  Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
5
5
 
6
+ ## [0.30.0] - 2026-07-03
7
+
8
+ _No changes — released alongside dependent packages._
9
+
10
+ ## [0.29.0] - 2026-07-02
11
+
12
+ ### Features
13
+ - **agent-sdk**: support GPT5/5.1/5.2/5.4 geo-aware + Opus 4.8 @W-23256760@ ([#635](https://github.com/forcedotcom/agentic-dx/pull/635))
14
+
6
15
  ## [0.28.0] - 2026-06-30
7
16
 
8
17
  ### Features
@@ -75,10 +75,13 @@ function pickProviderHintForGatewayModel(model) {
75
75
  if (name.startsWith('llmgateway__BedrockAnthropic') || name.startsWith('llmgateway__Anthropic')) {
76
76
  return 'bedrock-anthropic';
77
77
  }
78
- if (name.startsWith('llmgateway__OpenAI')) {
78
+ if (name.startsWith('llmgateway__OpenAI') || name.startsWith('sfdc_ai__Default')) {
79
+ // `sfdc_ai__Default*` is the geo-aware OpenAI route (W-23256760): the
80
+ // gateway selects the regional deployment, but the wire shape is still
81
+ // OpenAI Responses, so it resolves to the same providerHint.
79
82
  return 'openai-responses';
80
83
  }
81
- throw new Error(`Cannot infer providerHint for model "${name}". Salesforce gateway models must start with "llmgateway__BedrockAnthropic*" or "llmgateway__OpenAI*".`);
84
+ throw new Error(`Cannot infer providerHint for model "${name}". Salesforce gateway models must start with "llmgateway__BedrockAnthropic*", "llmgateway__OpenAI*", or "sfdc_ai__Default*".`);
82
85
  }
83
86
  /**
84
87
  * Returns the Salesforce LLM Gateway base URL for the given environment.
@@ -0,0 +1,11 @@
1
+ import { Model, ModelName } from './model.js';
2
+ import { type SupportedFileFormat } from './types.js';
3
+ export declare class ClaudeOpus48 extends Model {
4
+ readonly name: ModelName;
5
+ readonly displayId: string;
6
+ readonly maxInputTokens: number;
7
+ readonly maxOutputTokens: number;
8
+ readonly contextWindow: number;
9
+ readonly supportsPromptCache: boolean;
10
+ readonly supportedFormats: readonly SupportedFileFormat[];
11
+ }
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Copyright 2026, Salesforce, Inc. All rights reserved.
3
+ * See LICENSE.txt for license terms.
4
+ */
5
+ import { Model, ModelName } from './model.js';
6
+ import { MimeType } from './types.js';
7
+ export class ClaudeOpus48 extends Model {
8
+ name = ModelName.CLAUDE_OPUS_4_8;
9
+ displayId = 'Claude Opus 4.8';
10
+ // Caps mirror Opus 4.7 pending the gateway registry entry for
11
+ // BedrockAnthropicClaude48Opus.yml (W-23256760).
12
+ maxInputTokens = 1_000_000;
13
+ maxOutputTokens = 128_000;
14
+ contextWindow = 1_000_000;
15
+ supportsPromptCache = true;
16
+ supportedFormats = [
17
+ { name: 'png', mimeType: MimeType.Png, maxBytesPerFile: 3.75 * 1024 * 1024 },
18
+ { name: 'jpeg', mimeType: MimeType.Jpeg, maxBytesPerFile: 3.75 * 1024 * 1024 },
19
+ { name: 'pdf', mimeType: MimeType.Pdf, maxBytesPerFile: 4.5 * 1024 * 1024, maxFilesPerRequest: 5 },
20
+ ];
21
+ }
22
+ //# sourceMappingURL=claude-opus-4-8.js.map
@@ -0,0 +1,15 @@
1
+ import { Model, ModelName } from './model.js';
2
+ import { type SupportedFileFormat } from './types.js';
3
+ /**
4
+ * GPT-5.1 on the geo-aware `sfdc_ai__Default*` gateway route — routes to the
5
+ * OpenAI Responses wire shape (Mastra harness). See W-23256760.
6
+ */
7
+ export declare class GPT51Geo extends Model {
8
+ readonly name: ModelName;
9
+ readonly displayId: string;
10
+ readonly maxInputTokens: number;
11
+ readonly maxOutputTokens: number;
12
+ readonly contextWindow: number;
13
+ readonly supportsPromptCache: boolean;
14
+ readonly supportedFormats: readonly SupportedFileFormat[];
15
+ }
@@ -0,0 +1,25 @@
1
+ /*
2
+ * Copyright 2026, Salesforce, Inc. All rights reserved.
3
+ * See LICENSE.txt for license terms.
4
+ */
5
+ import { Model, ModelName } from './model.js';
6
+ import { MimeType } from './types.js';
7
+ /**
8
+ * GPT-5.1 on the geo-aware `sfdc_ai__Default*` gateway route — routes to the
9
+ * OpenAI Responses wire shape (Mastra harness). See W-23256760.
10
+ */
11
+ export class GPT51Geo extends Model {
12
+ name = ModelName.GPT_5_1_GEO;
13
+ displayId = 'GPT-5.1 (geo-aware)';
14
+ // source of truth: https://git.soma.salesforce.com/a360/file-metadata/blob/master/fm-model-config/src/main/resources/ai/file-metadata/model/openai/llmgateway/OpenAIGPT51.yml
15
+ maxInputTokens = 272000;
16
+ maxOutputTokens = 128000;
17
+ contextWindow = 272000;
18
+ supportsPromptCache = false;
19
+ supportedFormats = [
20
+ { name: 'png', mimeType: MimeType.Png },
21
+ { name: 'jpeg', mimeType: MimeType.Jpeg },
22
+ { name: 'pdf', mimeType: MimeType.Pdf },
23
+ ];
24
+ }
25
+ //# sourceMappingURL=gpt-5-1-geo.js.map
@@ -0,0 +1,15 @@
1
+ import { Model, ModelName } from './model.js';
2
+ import { type SupportedFileFormat } from './types.js';
3
+ /**
4
+ * GPT-5.2 on the geo-aware `sfdc_ai__Default*` gateway route — routes to the
5
+ * OpenAI Responses wire shape (Mastra harness). See W-23256760.
6
+ */
7
+ export declare class GPT52Geo extends Model {
8
+ readonly name: ModelName;
9
+ readonly displayId: string;
10
+ readonly maxInputTokens: number;
11
+ readonly maxOutputTokens: number;
12
+ readonly contextWindow: number;
13
+ readonly supportsPromptCache: boolean;
14
+ readonly supportedFormats: readonly SupportedFileFormat[];
15
+ }
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Copyright 2026, Salesforce, Inc. All rights reserved.
3
+ * See LICENSE.txt for license terms.
4
+ */
5
+ import { Model, ModelName } from './model.js';
6
+ import { MimeType } from './types.js';
7
+ /**
8
+ * GPT-5.2 on the geo-aware `sfdc_ai__Default*` gateway route — routes to the
9
+ * OpenAI Responses wire shape (Mastra harness). See W-23256760.
10
+ */
11
+ export class GPT52Geo extends Model {
12
+ name = ModelName.GPT_5_2_GEO;
13
+ displayId = 'GPT-5.2 (geo-aware)';
14
+ maxInputTokens = 272000;
15
+ maxOutputTokens = 128000;
16
+ contextWindow = 272000;
17
+ supportsPromptCache = false;
18
+ supportedFormats = [
19
+ { name: 'png', mimeType: MimeType.Png },
20
+ { name: 'jpeg', mimeType: MimeType.Jpeg },
21
+ { name: 'pdf', mimeType: MimeType.Pdf },
22
+ ];
23
+ }
24
+ //# sourceMappingURL=gpt-5-2-geo.js.map
@@ -0,0 +1,16 @@
1
+ import { Model, ModelName } from './model.js';
2
+ import { type SupportedFileFormat } from './types.js';
3
+ /**
4
+ * GPT-5.4 on the geo-aware `sfdc_ai__Default*` gateway route — the regional
5
+ * counterpart to the pinned `llmgateway__OpenAIGPT54` route ({@link GPT54}).
6
+ * Routes to the OpenAI Responses wire shape (Mastra harness). See W-23256760.
7
+ */
8
+ export declare class GPT54Geo extends Model {
9
+ readonly name: ModelName;
10
+ readonly displayId: string;
11
+ readonly maxInputTokens: number;
12
+ readonly maxOutputTokens: number;
13
+ readonly contextWindow: number;
14
+ readonly supportsPromptCache: boolean;
15
+ readonly supportedFormats: readonly SupportedFileFormat[];
16
+ }
@@ -0,0 +1,26 @@
1
+ /*
2
+ * Copyright 2026, Salesforce, Inc. All rights reserved.
3
+ * See LICENSE.txt for license terms.
4
+ */
5
+ import { Model, ModelName } from './model.js';
6
+ import { MimeType } from './types.js';
7
+ /**
8
+ * GPT-5.4 on the geo-aware `sfdc_ai__Default*` gateway route — the regional
9
+ * counterpart to the pinned `llmgateway__OpenAIGPT54` route ({@link GPT54}).
10
+ * Routes to the OpenAI Responses wire shape (Mastra harness). See W-23256760.
11
+ */
12
+ export class GPT54Geo extends Model {
13
+ name = ModelName.GPT_5_4_GEO;
14
+ displayId = 'GPT-5.4 (geo-aware)';
15
+ // Source of truth: https://git.soma.salesforce.com/a360/file-metadata/blob/master/fm-model-config/src/main/resources/ai/file-metadata/model/openai/llmgateway/OpenAIGPT54.yml
16
+ maxInputTokens = 1050000;
17
+ maxOutputTokens = 128000;
18
+ contextWindow = 1050000;
19
+ supportsPromptCache = false;
20
+ supportedFormats = [
21
+ { name: 'png', mimeType: MimeType.Png },
22
+ { name: 'jpeg', mimeType: MimeType.Jpeg },
23
+ { name: 'pdf', mimeType: MimeType.Pdf },
24
+ ];
25
+ }
26
+ //# sourceMappingURL=gpt-5-4-geo.js.map
@@ -0,0 +1,17 @@
1
+ import { Model, ModelName } from './model.js';
2
+ import { type SupportedFileFormat } from './types.js';
3
+ /**
4
+ * GPT-5 on the geo-aware `sfdc_ai__Default*` gateway route — the gateway
5
+ * picks the regional OpenAI deployment, distinct from the pinned
6
+ * `llmgateway__OpenAIGPT5` route ({@link GPT5}). Routes to the OpenAI
7
+ * Responses wire shape (Mastra harness). See W-23256760.
8
+ */
9
+ export declare class GPT5Geo extends Model {
10
+ readonly name: ModelName;
11
+ readonly displayId: string;
12
+ readonly maxInputTokens: number;
13
+ readonly maxOutputTokens: number;
14
+ readonly contextWindow: number;
15
+ readonly supportsPromptCache: boolean;
16
+ readonly supportedFormats: readonly SupportedFileFormat[];
17
+ }
@@ -0,0 +1,28 @@
1
+ /*
2
+ * Copyright 2026, Salesforce, Inc. All rights reserved.
3
+ * See LICENSE.txt for license terms.
4
+ */
5
+ import { Model, ModelName } from './model.js';
6
+ import { MimeType } from './types.js';
7
+ /**
8
+ * GPT-5 on the geo-aware `sfdc_ai__Default*` gateway route — the gateway
9
+ * picks the regional OpenAI deployment, distinct from the pinned
10
+ * `llmgateway__OpenAIGPT5` route ({@link GPT5}). Routes to the OpenAI
11
+ * Responses wire shape (Mastra harness). See W-23256760.
12
+ */
13
+ export class GPT5Geo extends Model {
14
+ name = ModelName.GPT_5_GEO;
15
+ displayId = 'GPT-5 (geo-aware)';
16
+ // Reference: https://git.soma.salesforce.com/a360/file-metadata/blob/master/fm-model-config/src/main/resources/ai/file-metadata/model/openai/sfdc_ai/DefaultOpenAIGPT5.yml
17
+ maxInputTokens = 272000;
18
+ maxOutputTokens = 128000;
19
+ contextWindow = 272000;
20
+ supportsPromptCache = false;
21
+ // same as gpt-5
22
+ supportedFormats = [
23
+ { name: 'png', mimeType: MimeType.Png },
24
+ { name: 'jpeg', mimeType: MimeType.Jpeg },
25
+ { name: 'pdf', mimeType: MimeType.Pdf },
26
+ ];
27
+ }
28
+ //# sourceMappingURL=gpt-5-geo.js.map
@@ -5,11 +5,16 @@ export { validateMultimodalFiles, MAX_FILES_PER_REQUEST, MAX_TOTAL_FILE_BYTES }
5
5
  export { GPT5 } from './gpt-5.js';
6
6
  export { GPT54 } from './gpt-5-4.js';
7
7
  export { GPT55 } from './gpt-5-5.js';
8
+ export { GPT5Geo } from './gpt-5-geo.js';
9
+ export { GPT51Geo } from './gpt-5-1-geo.js';
10
+ export { GPT52Geo } from './gpt-5-2-geo.js';
11
+ export { GPT54Geo } from './gpt-5-4-geo.js';
8
12
  export { ClaudeSonnet45 } from './claude-sonnet-4-5.js';
9
13
  export { ClaudeSonnet46 } from './claude-sonnet-4-6.js';
10
14
  export { ClaudeOpus45 } from './claude-opus-4-5.js';
11
15
  export { ClaudeOpus46 } from './claude-opus-4-6.js';
12
16
  export { ClaudeOpus47 } from './claude-opus-4-7.js';
17
+ export { ClaudeOpus48 } from './claude-opus-4-8.js';
13
18
  export { createClaudeModel, type ClaudeModelOverrides } from './create-claude-model.js';
14
19
  export declare function getDefault(): Model;
15
20
  export declare function getByName(modelName: ModelName): Model;
@@ -6,22 +6,32 @@ import { Model, ModelName } from './model.js';
6
6
  import { GPT5 } from './gpt-5.js';
7
7
  import { GPT54 } from './gpt-5-4.js';
8
8
  import { GPT55 } from './gpt-5-5.js';
9
+ import { GPT5Geo } from './gpt-5-geo.js';
10
+ import { GPT51Geo } from './gpt-5-1-geo.js';
11
+ import { GPT52Geo } from './gpt-5-2-geo.js';
12
+ import { GPT54Geo } from './gpt-5-4-geo.js';
9
13
  import { ClaudeSonnet45 } from './claude-sonnet-4-5.js';
10
14
  import { ClaudeSonnet46 } from './claude-sonnet-4-6.js';
11
15
  import { ClaudeOpus45 } from './claude-opus-4-5.js';
12
16
  import { ClaudeOpus46 } from './claude-opus-4-6.js';
13
17
  import { ClaudeOpus47 } from './claude-opus-4-7.js';
18
+ import { ClaudeOpus48 } from './claude-opus-4-8.js';
14
19
  export { Model, ModelName } from './model.js';
15
20
  export { MimeType } from './types.js';
16
21
  export { validateMultimodalFiles, MAX_FILES_PER_REQUEST, MAX_TOTAL_FILE_BYTES } from './multimodal.js';
17
22
  export { GPT5 } from './gpt-5.js';
18
23
  export { GPT54 } from './gpt-5-4.js';
19
24
  export { GPT55 } from './gpt-5-5.js';
25
+ export { GPT5Geo } from './gpt-5-geo.js';
26
+ export { GPT51Geo } from './gpt-5-1-geo.js';
27
+ export { GPT52Geo } from './gpt-5-2-geo.js';
28
+ export { GPT54Geo } from './gpt-5-4-geo.js';
20
29
  export { ClaudeSonnet45 } from './claude-sonnet-4-5.js';
21
30
  export { ClaudeSonnet46 } from './claude-sonnet-4-6.js';
22
31
  export { ClaudeOpus45 } from './claude-opus-4-5.js';
23
32
  export { ClaudeOpus46 } from './claude-opus-4-6.js';
24
33
  export { ClaudeOpus47 } from './claude-opus-4-7.js';
34
+ export { ClaudeOpus48 } from './claude-opus-4-8.js';
25
35
  export { createClaudeModel } from './create-claude-model.js';
26
36
  export function getDefault() {
27
37
  return new ClaudeSonnet46();
@@ -33,6 +43,14 @@ export function getByName(modelName) {
33
43
  return new GPT54();
34
44
  if (modelName === ModelName.GPT_5_5)
35
45
  return new GPT55();
46
+ if (modelName === ModelName.GPT_5_GEO)
47
+ return new GPT5Geo();
48
+ if (modelName === ModelName.GPT_5_1_GEO)
49
+ return new GPT51Geo();
50
+ if (modelName === ModelName.GPT_5_2_GEO)
51
+ return new GPT52Geo();
52
+ if (modelName === ModelName.GPT_5_4_GEO)
53
+ return new GPT54Geo();
36
54
  if (modelName === ModelName.CLAUDE_SONNET_4_5)
37
55
  return new ClaudeSonnet45();
38
56
  if (modelName === ModelName.CLAUDE_SONNET_4_6)
@@ -43,6 +61,8 @@ export function getByName(modelName) {
43
61
  return new ClaudeOpus46();
44
62
  if (modelName === ModelName.CLAUDE_OPUS_4_7)
45
63
  return new ClaudeOpus47();
64
+ if (modelName === ModelName.CLAUDE_OPUS_4_8)
65
+ return new ClaudeOpus48();
46
66
  throw new Error(`No model mapping exists for "${modelName}".`);
47
67
  }
48
68
  export const Models = { getDefault, getByName };
@@ -13,11 +13,16 @@ export declare enum ModelName {
13
13
  GPT_5 = "llmgateway__OpenAIGPT5",
14
14
  GPT_5_4 = "llmgateway__OpenAIGPT54",
15
15
  GPT_5_5 = "llmgateway__OpenAIGPT55",
16
+ GPT_5_GEO = "sfdc_ai__DefaultGPT5",
17
+ GPT_5_1_GEO = "sfdc_ai__DefaultGPT51",
18
+ GPT_5_2_GEO = "sfdc_ai__DefaultGPT52",
19
+ GPT_5_4_GEO = "sfdc_ai__DefaultGPT54",
16
20
  CLAUDE_SONNET_4_5 = "llmgateway__BedrockAnthropicClaude45Sonnet",
17
21
  CLAUDE_SONNET_4_6 = "llmgateway__BedrockAnthropicClaude46Sonnet",
18
22
  CLAUDE_OPUS_4_5 = "llmgateway__BedrockAnthropicClaude45Opus",
19
23
  CLAUDE_OPUS_4_6 = "llmgateway__BedrockAnthropicClaude46Opus",
20
- CLAUDE_OPUS_4_7 = "llmgateway__BedrockAnthropicClaude47Opus"
24
+ CLAUDE_OPUS_4_7 = "llmgateway__BedrockAnthropicClaude47Opus",
25
+ CLAUDE_OPUS_4_8 = "llmgateway__BedrockAnthropicClaude48Opus"
21
26
  }
22
27
  /**
23
28
  * Abstract description of a model the SDK / harness can talk to. Used for:
@@ -17,11 +17,19 @@ export var ModelName;
17
17
  ModelName["GPT_5"] = "llmgateway__OpenAIGPT5";
18
18
  ModelName["GPT_5_4"] = "llmgateway__OpenAIGPT54";
19
19
  ModelName["GPT_5_5"] = "llmgateway__OpenAIGPT55";
20
+ // Geo-aware `sfdc_ai__Default*` route: the gateway selects the regional
21
+ // OpenAI deployment. Distinct ids from the pinned `llmgateway__OpenAIGPT*`
22
+ // entries above so both routings coexist (W-23256760).
23
+ ModelName["GPT_5_GEO"] = "sfdc_ai__DefaultGPT5";
24
+ ModelName["GPT_5_1_GEO"] = "sfdc_ai__DefaultGPT51";
25
+ ModelName["GPT_5_2_GEO"] = "sfdc_ai__DefaultGPT52";
26
+ ModelName["GPT_5_4_GEO"] = "sfdc_ai__DefaultGPT54";
20
27
  ModelName["CLAUDE_SONNET_4_5"] = "llmgateway__BedrockAnthropicClaude45Sonnet";
21
28
  ModelName["CLAUDE_SONNET_4_6"] = "llmgateway__BedrockAnthropicClaude46Sonnet";
22
29
  ModelName["CLAUDE_OPUS_4_5"] = "llmgateway__BedrockAnthropicClaude45Opus";
23
30
  ModelName["CLAUDE_OPUS_4_6"] = "llmgateway__BedrockAnthropicClaude46Opus";
24
31
  ModelName["CLAUDE_OPUS_4_7"] = "llmgateway__BedrockAnthropicClaude47Opus";
32
+ ModelName["CLAUDE_OPUS_4_8"] = "llmgateway__BedrockAnthropicClaude48Opus";
25
33
  })(ModelName || (ModelName = {}));
26
34
  /**
27
35
  * Abstract description of a model the SDK / harness can talk to. Used for:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/sfdx-agent-sdk",
3
- "version": "0.28.0",
3
+ "version": "0.30.0",
4
4
  "description": "Harness-agnostic agentic infrastructure for Salesforce developer experience tooling",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -44,8 +44,8 @@
44
44
  },
45
45
  "devDependencies": {
46
46
  "@eslint/js": "^10.0.1",
47
- "@salesforce/sfdx-agent-harness-claude": "0.24.0",
48
- "@salesforce/sfdx-agent-harness-mastra": "0.27.0",
47
+ "@salesforce/sfdx-agent-harness-claude": "0.26.0",
48
+ "@salesforce/sfdx-agent-harness-mastra": "0.29.0",
49
49
  "@types/node": "^22.20.0",
50
50
  "@vitest/coverage-istanbul": "^4.1.8",
51
51
  "@vitest/eslint-plugin": "^1.6.20",