Skip to content

feat: upgrade default Python runtime to PYTHON_3_14#837

Merged
jesseturner21 merged 5 commits into
mainfrom
feat/upgrade-default-python-3.14
Apr 15, 2026
Merged

feat: upgrade default Python runtime to PYTHON_3_14#837
jesseturner21 merged 5 commits into
mainfrom
feat/upgrade-default-python-3.14

Conversation

@jesseturner21
Copy link
Copy Markdown
Contributor

@jesseturner21 jesseturner21 commented Apr 14, 2026

Description

Upgrade the default Python runtime version from PYTHON_3_13 to PYTHON_3_14 for new agents and MCP tools.

Changes:

  • Add PYTHON_3_14 to the PythonRuntimeSchema Zod enum and all related type definitions
  • Update all default constants (DEFAULT_PYTHON_VERSION) to PYTHON_3_14
  • Add PYTHON_3_14 as "Latest" in the MCP Python version UI picker, demote 3.13
  • Update packaging fallback, import constants mapping, and vended AGENTS.md template
  • Update tests: schema validation, version extraction, schema-mapper expectations, and snapshots

Note: The JSON schema (schemas/agentcore.schema.v1.json) is auto-regenerated during the release workflow and is not modified in this PR. The Zod enum change will flow into the JSON schema at release time.

Related Issue

Merge order: The companion CDK constructs PR must be merged and released first, otherwise CDK synth will reject PYTHON_3_14 as an unknown runtime version.

Documentation PR

N/A

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe):

Testing

How have you tested the change?

  • I ran npm run test:unit and npm run test:integ
  • I ran npm run typecheck
  • I ran npm run lint
  • If I modified src/assets/, I ran npm run test:update-snapshots and committed the updated snapshots

End-to-end verification:

  • Created a new project with agentcore create --defaults — confirmed runtimeVersion: "PYTHON_3_14" in generated agentcore.json
  • Deployed to AWS using a bundled distribution (CLI + CDK constructs) — CloudFormation template confirmed "Runtime": "PYTHON_3_14" on the AWS::BedrockAgentCore::Runtime resource
  • Invoked the deployed runtime — received successful response (HTTP 200)

E2E CI note: The e2e (main) and e2e (npm) jobs will fail until the CDK constructs PR (https://github.com/aws/agentcore-l3-cdk-constructs/pull/146) is merged and released. The E2E tests install CDK constructs separately from npm or the CDK main branch, which don't yet include PYTHON_3_14 support.

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.

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.
@jesseturner21 jesseturner21 requested a review from a team April 14, 2026 17:55
@github-actions github-actions Bot added the size/s PR size: S label Apr 14, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Package Tarball

aws-agentcore-0.8.0.tgz

How to install

npm install https://github.com/aws/agentcore-cli/releases/download/pr-837-tarball/aws-agentcore-0.8.0.tgz

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 14, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 44.57% 7060 / 15840
🔵 Statements 44.04% 7491 / 17007
🔵 Functions 41.98% 1262 / 3006
🔵 Branches 43.59% 4752 / 10900
Generated in workflow #1790 for commit 3acc99d by the Vitest Coverage Report Action

The JSON schema file is auto-regenerated during the release workflow.
Direct changes are rejected by the schema-check CI job.
@github-actions github-actions Bot added size/s PR size: S and removed size/s PR size: S labels Apr 14, 2026
@aidandaly24
Copy link
Copy Markdown
Contributor

1. Missed defaults/fallbacks

Three files still hardcode PYTHON_3_13 as a default and need to be updated to PYTHON_3_14:

  • src/lib/packaging/index.ts:81packCodeZipSync fallback: config.runtimeVersion ?? 'PYTHON_3_13'. The same pattern in python.ts:158 was updated but this one was missed.
  • src/schema/llm-compacted/mcp.ts:180PythonRuntime type is missing 'PYTHON_3_14'. The CDK PR updated its copy of this file, and llm-compacted/agentcore.ts was updated in this PR, but this one was missed.
  • src/cli/primitives/AgentPrimitive.tsx:529 — Hardcoded runtimeVersion: 'PYTHON_3_13' used when creating agents via the primitive.

2. Tests that should include PYTHON_3_14

  • src/schema/schemas/__tests__/agent-env.test.ts:212 — The schema acceptance test iterates over ['PYTHON_3_10', ..., 'PYTHON_3_13'] to validate AgentEnvSpecSchema. PYTHON_3_14 should be added to this list.
  • src/tui-harness/helpers.ts:106 — The TUI test harness fixture uses runtimeVersion: 'PYTHON_3_13' as its default. Should be updated so TUI integration tests run against the current default.

3. Docs still showing PYTHON_3_13

  • docs/configuration.md:34,169 — Example configs show "runtimeVersion": "PYTHON_3_13".
  • docs/configuration.md:203 — The "Runtime Versions" list doesn't include PYTHON_3_14.
  • docs/container-builds.md:61 — Example config shows "runtimeVersion": "PYTHON_3_13".

- 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
@github-actions github-actions Bot added size/s PR size: S and removed size/s PR size: S labels Apr 15, 2026
@jesseturner21
Copy link
Copy Markdown
Contributor Author

Thanks for the thorough review! All three categories addressed in 604f025:

1. Missed defaults/fallbacks — Fixed all three:

  • src/lib/packaging/index.ts:81 — fallback updated to PYTHON_3_14
  • src/schema/llm-compacted/mcp.ts:180 — added PYTHON_3_14 to PythonRuntime type
  • src/cli/primitives/AgentPrimitive.tsx:529 — hardcoded runtimeVersion updated

2. Tests — Both updated:

  • src/schema/schemas/__tests__/agent-env.test.ts:212PYTHON_3_14 added to the runtime version iteration list
  • src/tui-harness/helpers.ts:106 — fixture default updated

3. Docs — All examples and the runtime versions list updated:

  • docs/configuration.md — both example configs updated, PYTHON_3_14 added to the Runtime Versions list
  • docs/container-builds.md — example config updated

All 3297 unit tests pass, pre-commit hooks (lint, prettier, typecheck) clean.

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.
@github-actions github-actions Bot added size/s PR size: S and removed size/s PR size: S labels Apr 15, 2026
… 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.
@jesseturner21 jesseturner21 merged commit b139c05 into main Apr 15, 2026
23 of 26 checks passed
@jesseturner21 jesseturner21 deleted the feat/upgrade-default-python-3.14 branch April 15, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants