diff --git a/docs/configuration.md b/docs/configuration.md index bac57bc00..0a8e012cb 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -31,7 +31,7 @@ Main project configuration using a **flat resource model**. Agents, memories, an "build": "CodeZip", "entrypoint": "main.py", "codeLocation": "app/MyAgent/", - "runtimeVersion": "PYTHON_3_14", + "runtimeVersion": "PYTHON_3_13", "networkMode": "PUBLIC", "protocol": "HTTP" } @@ -168,7 +168,7 @@ on the next deployment. "build": "CodeZip", "entrypoint": "main.py", "codeLocation": "app/MyAgent/", - "runtimeVersion": "PYTHON_3_14", + "runtimeVersion": "PYTHON_3_13", "networkMode": "PUBLIC", "envVars": [{ "name": "MY_VAR", "value": "my-value" }], "instrumentation": { diff --git a/docs/container-builds.md b/docs/container-builds.md index 5d82d2f03..08aa35a91 100644 --- a/docs/container-builds.md +++ b/docs/container-builds.md @@ -81,7 +81,7 @@ In `agentcore.json`, set `"build": "Container"`: "build": "Container", "entrypoint": "main.py", "codeLocation": "app/MyAgent/", - "runtimeVersion": "PYTHON_3_14" + "runtimeVersion": "PYTHON_3_13" } ``` diff --git a/src/cli/operations/agent/generate/__tests__/schema-mapper.test.ts b/src/cli/operations/agent/generate/__tests__/schema-mapper.test.ts index a96db26a9..e9590652c 100644 --- a/src/cli/operations/agent/generate/__tests__/schema-mapper.test.ts +++ b/src/cli/operations/agent/generate/__tests__/schema-mapper.test.ts @@ -87,7 +87,7 @@ describe('mapGenerateConfigToAgent', () => { expect(result.name).toBe('TestProject'); expect(result.build).toBe('CodeZip'); expect(result.entrypoint).toBe('main.py'); - expect(result.runtimeVersion).toBe('PYTHON_3_14'); + expect(result.runtimeVersion).toBe('PYTHON_3_13'); expect(result.networkMode).toBe('PUBLIC'); expect(result.protocol).toBe('HTTP'); }); diff --git a/src/cli/tui/screens/mcp/__tests__/types.test.ts b/src/cli/tui/screens/mcp/__tests__/types.test.ts index a3306544b..f534d3896 100644 --- a/src/cli/tui/screens/mcp/__tests__/types.test.ts +++ b/src/cli/tui/screens/mcp/__tests__/types.test.ts @@ -1,4 +1,10 @@ -import { AUTHORIZER_TYPE_OPTIONS, ENTER_KB_ID_MANUALLY, SKIP_FOR_NOW, TARGET_TYPE_OPTIONS } from '../types.js'; +import { + AUTHORIZER_TYPE_OPTIONS, + ENTER_KB_ID_MANUALLY, + PYTHON_VERSION_OPTIONS, + SKIP_FOR_NOW, + TARGET_TYPE_OPTIONS, +} from '../types.js'; import { describe, expect, it } from 'vitest'; describe('MCP types constants', () => { @@ -26,4 +32,12 @@ describe('MCP types constants', () => { // the screen branches on this exact id when the user picks the manual path. expect(ENTER_KB_ID_MANUALLY).toBe('__enter_kb_id__'); }); + + it('PYTHON_VERSION_OPTIONS defaults to a universally-available runtime, not PYTHON_3_14', () => { + // 3.14 is not yet GA in every region, so it must not be the first/highlighted pick. + expect(PYTHON_VERSION_OPTIONS[0]?.id).toBe('PYTHON_3_13'); + expect(PYTHON_VERSION_OPTIONS[0]?.id).not.toBe('PYTHON_3_14'); + // 3.14 stays selectable for users in supported regions. + expect(PYTHON_VERSION_OPTIONS.some(opt => opt.id === 'PYTHON_3_14')).toBe(true); + }); }); diff --git a/src/cli/tui/screens/mcp/types.ts b/src/cli/tui/screens/mcp/types.ts index 482b47ff7..9bfa4da15 100644 --- a/src/cli/tui/screens/mcp/types.ts +++ b/src/cli/tui/screens/mcp/types.ts @@ -425,8 +425,8 @@ export const POLICY_ENGINE_MODE_OPTIONS = [ ] as const; export const PYTHON_VERSION_OPTIONS = [ - { id: 'PYTHON_3_14', title: 'Python 3.14', description: 'Latest' }, - { id: 'PYTHON_3_13', title: 'Python 3.13', description: '' }, + { id: 'PYTHON_3_13', title: 'Python 3.13', description: 'Recommended' }, + { id: 'PYTHON_3_14', title: 'Python 3.14', description: 'Not yet available in all regions' }, { id: 'PYTHON_3_12', title: 'Python 3.12', description: '' }, { id: 'PYTHON_3_11', title: 'Python 3.11', description: '' }, { id: 'PYTHON_3_10', title: 'Python 3.10', description: '' }, diff --git a/src/schema/__tests__/constants.test.ts b/src/schema/__tests__/constants.test.ts index 0c52b8f2c..1f4a5232d 100644 --- a/src/schema/__tests__/constants.test.ts +++ b/src/schema/__tests__/constants.test.ts @@ -1,4 +1,5 @@ import { + DEFAULT_PYTHON_VERSION, LANGUAGE_FRAMEWORK_MATRIX, ModelProviderSchema, NetworkModeSchema, @@ -75,6 +76,11 @@ describe('RuntimeVersionSchemas', () => { expect(NodeRuntimeSchema.safeParse('NODE_24').success).toBe(false); expect(RuntimeVersionSchema.safeParse('RUBY_3_0').success).toBe(false); }); + + it('defaults new agents to a universally-available Python runtime (not PYTHON_3_14)', () => { + expect(DEFAULT_PYTHON_VERSION).toBe('PYTHON_3_13'); + expect(PythonRuntimeSchema.safeParse(DEFAULT_PYTHON_VERSION).success).toBe(true); + }); }); describe('NetworkModeSchema', () => { diff --git a/src/schema/constants.ts b/src/schema/constants.ts index 35d09fc61..5e6a785fb 100644 --- a/src/schema/constants.ts +++ b/src/schema/constants.ts @@ -150,7 +150,7 @@ export const PythonRuntimeSchema = z.enum(['PYTHON_3_10', 'PYTHON_3_11', 'PYTHON export type PythonRuntime = z.infer; /** Default Python runtime version for new agents and MCP tools */ -export const DEFAULT_PYTHON_VERSION: PythonRuntime = 'PYTHON_3_14'; +export const DEFAULT_PYTHON_VERSION: PythonRuntime = 'PYTHON_3_13'; export const NodeRuntimeSchema = z.enum(['NODE_18', 'NODE_20', 'NODE_22']); export type NodeRuntime = z.infer;