Skip to content

Commit dfdc2cb

Browse files
feat: upgrade default Python runtime to PYTHON_3_13 (#658)
* feat: upgrade default Python runtime to PYTHON_3_14 Add PYTHON_3_14 to the PythonRuntime enum and make it the default across all agent, MCP, and generate workflows. Updates defaults, fallbacks, TUI options, tests, docs, and snapshots. Constraint: PYTHON_3_14 must be added to the Zod enum in schema/constants.ts as all other types derive from it Rejected: Only adding enum without changing default | user requested default upgrade Confidence: high Scope-risk: broad Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: revert default Python to PYTHON_3_13, keep PYTHON_3_14 in enum The Bedrock AgentCore service API does not yet accept PYTHON_3_14. CloudFormation validation rejects it at deploy time: "PYTHON_3_14 is not a valid enum value. Supported values: [PYTHON_3_10, PYTHON_3_11, PYTHON_3_12, PYTHON_3_13]" Keep PYTHON_3_14 in the Zod enum for forward-compatibility but revert all defaults and fallbacks back to PYTHON_3_13. Constraint: Service API only supports PYTHON_3_10 through PYTHON_3_13 Rejected: Default to PYTHON_3_14 | service rejects at deploy time Confidence: high Scope-risk: narrow Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix: remove PYTHON_3_14 from enum — service does not support it yet The Bedrock AgentCore API only accepts PYTHON_3_10 through PYTHON_3_13. Remove PYTHON_3_14 entirely to avoid deploy failures for users. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ac32563 commit dfdc2cb

9 files changed

Lines changed: 10 additions & 10 deletions

File tree

docs/configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Main project configuration using a **flat resource model**. Agents, memories, an
2929
"build": "CodeZip",
3030
"entrypoint": "main.py",
3131
"codeLocation": "app/MyAgent/",
32-
"runtimeVersion": "PYTHON_3_12"
32+
"runtimeVersion": "PYTHON_3_13"
3333
}
3434
],
3535
"memories": [
@@ -187,7 +187,7 @@ on the next deployment.
187187
"build": "CodeZip",
188188
"entrypoint": "main.py",
189189
"codeLocation": "app/MyAgent/",
190-
"runtimeVersion": "PYTHON_3_12",
190+
"runtimeVersion": "PYTHON_3_13",
191191
"networkMode": "PUBLIC",
192192
"envVars": [{ "name": "MY_VAR", "value": "my-value" }],
193193
"instrumentation": {

docs/container-builds.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ In `agentcore.json`, set `"build": "Container"`:
5959
"build": "Container",
6060
"entrypoint": "main.py",
6161
"codeLocation": "app/MyAgent/",
62-
"runtimeVersion": "PYTHON_3_12"
62+
"runtimeVersion": "PYTHON_3_13"
6363
}
6464
```
6565

src/cli/operations/agent/generate/__tests__/schema-mapper.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ describe('mapGenerateConfigToAgent', () => {
109109
expect(result.name).toBe('TestProject');
110110
expect(result.build).toBe('CodeZip');
111111
expect(result.entrypoint).toBe('main.py');
112-
expect(result.runtimeVersion).toBe('PYTHON_3_12');
112+
expect(result.runtimeVersion).toBe('PYTHON_3_13');
113113
expect(result.networkMode).toBe('PUBLIC');
114114
expect(result.protocol).toBe('HTTP');
115115
});

src/cli/primitives/AgentPrimitive.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ export class AgentPrimitive extends BasePrimitive<AddAgentOptions, RemovableReso
513513
build: options.buildType,
514514
entrypoint: (options.entrypoint ?? 'main.py') as FilePath,
515515
codeLocation: codeLocation as DirectoryPath,
516-
runtimeVersion: 'PYTHON_3_12',
516+
runtimeVersion: 'PYTHON_3_13',
517517
protocol,
518518
networkMode,
519519
...(networkMode === 'VPC' &&

src/cli/tui/screens/agent/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,5 +185,5 @@ export const NETWORK_MODE_OPTIONS = [
185185
{ id: 'VPC', title: 'VPC', description: 'Attach to your VPC' },
186186
] as const;
187187

188-
export const DEFAULT_PYTHON_VERSION: PythonRuntime = 'PYTHON_3_12';
188+
export const DEFAULT_PYTHON_VERSION: PythonRuntime = 'PYTHON_3_13';
189189
export const DEFAULT_ENTRYPOINT = 'main.py';

src/cli/tui/screens/generate/defaults.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { NetworkMode, PythonRuntime } from '../../../../schema';
55
*/
66

77
/** Default Python runtime version for new agents */
8-
export const DEFAULT_PYTHON_VERSION: PythonRuntime = 'PYTHON_3_12';
8+
export const DEFAULT_PYTHON_VERSION: PythonRuntime = 'PYTHON_3_13';
99

1010
/** Default network mode for agent runtimes */
1111
export const DEFAULT_NETWORK_MODE: NetworkMode = 'PUBLIC';

src/lib/packaging/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export async function packRuntime(spec: AgentEnvSpec, options?: PackageOptions):
7878
* Defaults to Python if no runtimeVersion is specified.
7979
*/
8080
export function packCodeZipSync(config: CodeBundleConfig | AgentEnvSpec, options?: PackageOptions): ArtifactResult {
81-
const runtimeVersion = config.runtimeVersion ?? 'PYTHON_3_12';
81+
const runtimeVersion = config.runtimeVersion ?? 'PYTHON_3_13';
8282
const packager = getCodeZipPackager(runtimeVersion);
8383
return packager.packCodeZip(config as AgentEnvSpec, options);
8484
}

src/lib/packaging/python.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export class PythonCodeZipPackager implements RuntimePackager {
155155
*/
156156
export class PythonCodeZipPackagerSync implements CodeZipPackager {
157157
packCodeZip(config: AgentEnvSpec, options: PackageOptions = {}): ArtifactResult {
158-
const runtimeVersion = config.runtimeVersion ?? 'PYTHON_3_12';
158+
const runtimeVersion = config.runtimeVersion ?? 'PYTHON_3_13';
159159

160160
if (!isPythonRuntimeVersion(runtimeVersion)) {
161161
throw new PackagingError(`Python packager only supports Python runtimes. Received: ${runtimeVersion}`);

src/tui-harness/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export async function createMinimalProjectDir(
104104
build: 'CodeZip',
105105
entrypoint: 'main.py:handler',
106106
codeLocation: 'app/TestAgent',
107-
runtimeVersion: 'PYTHON_3_12',
107+
runtimeVersion: 'PYTHON_3_13',
108108
});
109109

110110
// Create the agent code directory so the CLI does not complain.

0 commit comments

Comments
 (0)