Skip to content

Commit b139c05

Browse files
feat: upgrade default Python runtime to PYTHON_3_14 (#837)
* feat: upgrade default Python runtime to PYTHON_3_14 Add PYTHON_3_14 as a supported runtime version and make it the default for new agents and MCP tools. Updates schema enums, defaults, UI options, packaging fallbacks, import mappings, and tests. Verified end-to-end: deployed a runtime with PYTHON_3_14 to AgentCore and confirmed successful invocation. * chore: revert JSON schema change (auto-generated at release) The JSON schema file is auto-regenerated during the release workflow. Direct changes are rejected by the schema-check CI job. * fix: address review — missed defaults, types, tests, and docs - Update packCodeZipSync fallback in packaging/index.ts - Add PYTHON_3_14 to llm-compacted/mcp.ts PythonRuntime type - Update hardcoded runtimeVersion in AgentPrimitive.tsx - Add PYTHON_3_14 to agent-env schema test - Update TUI harness fixture default - Update docs examples and runtime version list * refactor: consolidate DEFAULT_PYTHON_VERSION into schema/constants Define DEFAULT_PYTHON_VERSION once in schema/constants.ts and re-export from the three TUI screen files that previously defined their own copy. Replace hardcoded 'PYTHON_3_14' fallbacks in packaging and AgentPrimitive with the shared constant. Future runtime version bumps now require a single-line change. * fix: detect Python ABI tag and usable wheels errors in platform retry logic When numpy lacks pre-built wheels for a specific manylinux platform on CPython 3.14, uv reports "no wheels with a matching Python ABI tag" or "has no usable wheels" instead of the platform-specific errors the retry logic was matching. This caused the packager to hard-fail on the first platform candidate instead of retrying with a newer manylinux version that does have compatible wheels.
1 parent 8e92987 commit b139c05

21 files changed

Lines changed: 58 additions & 26 deletions

File tree

docs/configuration.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Main project configuration using a **flat resource model**. Agents, memories, an
3131
"build": "CodeZip",
3232
"entrypoint": "main.py",
3333
"codeLocation": "app/MyAgent/",
34-
"runtimeVersion": "PYTHON_3_13",
34+
"runtimeVersion": "PYTHON_3_14",
3535
"networkMode": "PUBLIC",
3636
"protocol": "HTTP"
3737
}
@@ -166,7 +166,7 @@ on the next deployment.
166166
"build": "CodeZip",
167167
"entrypoint": "main.py",
168168
"codeLocation": "app/MyAgent/",
169-
"runtimeVersion": "PYTHON_3_13",
169+
"runtimeVersion": "PYTHON_3_14",
170170
"networkMode": "PUBLIC",
171171
"envVars": [{ "name": "MY_VAR", "value": "my-value" }],
172172
"instrumentation": {
@@ -201,6 +201,7 @@ on the next deployment.
201201
- `PYTHON_3_11`
202202
- `PYTHON_3_12`
203203
- `PYTHON_3_13`
204+
- `PYTHON_3_14`
204205

205206
**Node.js:**
206207

docs/container-builds.md

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

src/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4010,7 +4010,7 @@ file maps to a JSON config file and includes validation constraints as comments.
40104010
40114011
- **BuildType**: \`'CodeZip'\` | \`'Container'\`
40124012
- **NetworkMode**: \`'PUBLIC'\`
4013-
- **RuntimeVersion**: \`'PYTHON_3_10'\` | \`'PYTHON_3_11'\` | \`'PYTHON_3_12'\` | \`'PYTHON_3_13'\`
4013+
- **RuntimeVersion**: \`'PYTHON_3_10'\` | \`'PYTHON_3_11'\` | \`'PYTHON_3_12'\` | \`'PYTHON_3_13'\` | \`'PYTHON_3_14'\`
40144014
- **MemoryStrategyType**: \`'SEMANTIC'\` | \`'SUMMARIZATION'\` | \`'USER_PREFERENCE'\` | \`'EPISODIC'\`
40154015
40164016
### Build Types

src/assets/agents/AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ file maps to a JSON config file and includes validation constraints as comments.
6262

6363
- **BuildType**: `'CodeZip'` | `'Container'`
6464
- **NetworkMode**: `'PUBLIC'`
65-
- **RuntimeVersion**: `'PYTHON_3_10'` | `'PYTHON_3_11'` | `'PYTHON_3_12'` | `'PYTHON_3_13'`
65+
- **RuntimeVersion**: `'PYTHON_3_10'` | `'PYTHON_3_11'` | `'PYTHON_3_12'` | `'PYTHON_3_13'` | `'PYTHON_3_14'`
6666
- **MemoryStrategyType**: `'SEMANTIC'` | `'SUMMARIZATION'` | `'USER_PREFERENCE'` | `'EPISODIC'`
6767

6868
### Build Types

src/cli/commands/import/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,5 @@ export const RUNTIME_TYPE_MAP: Record<string, string> = {
5151
PYTHON_3_11: 'PYTHON_3_11',
5252
PYTHON_3_12: 'PYTHON_3_12',
5353
PYTHON_3_13: 'PYTHON_3_13',
54+
PYTHON_3_14: 'PYTHON_3_14',
5455
};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ describe('mapGenerateConfigToAgent', () => {
8787
expect(result.name).toBe('TestProject');
8888
expect(result.build).toBe('CodeZip');
8989
expect(result.entrypoint).toBe('main.py');
90-
expect(result.runtimeVersion).toBe('PYTHON_3_13');
90+
expect(result.runtimeVersion).toBe('PYTHON_3_14');
9191
expect(result.networkMode).toBe('PUBLIC');
9292
expect(result.protocol).toBe('HTTP');
9393
});

src/cli/primitives/AgentPrimitive.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@ import type {
1212
SDKFramework,
1313
TargetLanguage,
1414
} from '../../schema';
15-
import { AgentEnvSpecSchema, CREDENTIAL_PROVIDERS, LIFECYCLE_TIMEOUT_MAX, LIFECYCLE_TIMEOUT_MIN } from '../../schema';
15+
import {
16+
AgentEnvSpecSchema,
17+
CREDENTIAL_PROVIDERS,
18+
DEFAULT_PYTHON_VERSION,
19+
LIFECYCLE_TIMEOUT_MAX,
20+
LIFECYCLE_TIMEOUT_MIN,
21+
} from '../../schema';
1622
import type { AddAgentOptions as CLIAddAgentOptions } from '../commands/add/types';
1723
import { validateAddAgentOptions } from '../commands/add/validate';
1824
import { parseAndNormalizeHeaders } from '../commands/shared/header-utils';
@@ -526,7 +532,7 @@ export class AgentPrimitive extends BasePrimitive<AddAgentOptions, RemovableReso
526532
build: options.buildType,
527533
entrypoint: (options.entrypoint ?? 'main.py') as FilePath,
528534
codeLocation: codeLocation as DirectoryPath,
529-
runtimeVersion: 'PYTHON_3_13',
535+
runtimeVersion: DEFAULT_PYTHON_VERSION,
530536
protocol,
531537
networkMode,
532538
...(networkMode === 'VPC' &&

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

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

192-
export const DEFAULT_PYTHON_VERSION: PythonRuntime = 'PYTHON_3_13';
192+
export { DEFAULT_PYTHON_VERSION } from '../../../../schema';
193193
export const DEFAULT_ENTRYPOINT = 'main.py';

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
import type { NetworkMode, PythonRuntime } from '../../../../schema';
1+
import type { NetworkMode } from '../../../../schema';
2+
3+
export { DEFAULT_PYTHON_VERSION } from '../../../../schema';
24

35
/**
46
* Default configuration values for create command
57
*/
68

7-
/** Default Python runtime version for new agents */
8-
export const DEFAULT_PYTHON_VERSION: PythonRuntime = 'PYTHON_3_13';
9-
109
/** Default network mode for agent runtimes */
1110
export const DEFAULT_NETWORK_MODE: NetworkMode = 'PUBLIC';
1211

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import type {
66
GatewayPolicyEngineConfiguration,
77
GatewayTargetType,
88
NodeRuntime,
9-
PythonRuntime,
109
SchemaSource,
1110
ToolDefinition,
1211
} from '../../../../schema';
@@ -278,7 +277,8 @@ export const POLICY_ENGINE_MODE_OPTIONS = [
278277
] as const;
279278

280279
export const PYTHON_VERSION_OPTIONS = [
281-
{ id: 'PYTHON_3_13', title: 'Python 3.13', description: 'Latest' },
280+
{ id: 'PYTHON_3_14', title: 'Python 3.14', description: 'Latest' },
281+
{ id: 'PYTHON_3_13', title: 'Python 3.13', description: '' },
282282
{ id: 'PYTHON_3_12', title: 'Python 3.12', description: '' },
283283
{ id: 'PYTHON_3_11', title: 'Python 3.11', description: '' },
284284
{ id: 'PYTHON_3_10', title: 'Python 3.10', description: '' },
@@ -294,6 +294,6 @@ export const NODE_VERSION_OPTIONS = [
294294
// Defaults
295295
// ─────────────────────────────────────────────────────────────────────────────
296296

297-
export const DEFAULT_PYTHON_VERSION: PythonRuntime = 'PYTHON_3_13';
297+
export { DEFAULT_PYTHON_VERSION } from '../../../../schema';
298298
export const DEFAULT_NODE_VERSION: NodeRuntime = 'NODE_20';
299299
export const DEFAULT_HANDLER = 'handler.lambda_handler';

0 commit comments

Comments
 (0)