Skip to content

feat: add pydantic agentic engine with uv support and smoke test#45493

Closed
pelikhan with Copilot wants to merge 4 commits into
mainfrom
copilot/add-shared-genetic-workflow
Closed

feat: add pydantic agentic engine with uv support and smoke test#45493
pelikhan with Copilot wants to merge 4 commits into
mainfrom
copilot/add-shared-genetic-workflow

Conversation

Copilot AI commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Adds pydantic as a ninth built-in engine backed by pydantic-ai[cli], installed via uv. Extends the BehaviorDefinedEngine infrastructure (previously npm-only) to support Python/uv tooling.

Engine infrastructure

  • pkg/workflow/python.go — new uv install step generators mirroring nodejs.go (GenerateUvSetupStep, GenerateUvToolInstallSteps, BuildUvEngineInstallStepsWithAWF); uses the already-pinned astral-sh/setup-uv@v8.2.0
  • pkg/workflow/behavior_defined_engine.go — replaced early-return-on-non-npm guard with a switch on PackageManager to dispatch to either npm or uv install paths

New engine

  • pkg/workflow/data/engines/pydantic.md — declarative definition: package-manager: uv, secret-strategy: universal-llm-consumer, model env var PYDANTIC_AI_MODEL
  • pkg/workflow/agentic_engine.go — registered "pydantic" alongside opencode/crush in the BehaviorDefinedEngine loop
  • pkg/constants/engine_constants.goPydanticEngine constant, appended to AgenticEngines, added EngineOptions entry

Smoke test & docs

  • .github/workflows/smoke-pydantic.md — minimal smoke workflow exercising the engine end-to-end
  • docs/src/content/docs/reference/engines.md — pydantic row added to all engine tables

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot as a shared agentic workflow, not in the go compiler/code

Copilot AI and others added 3 commits July 14, 2026 13:55
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Add .github/workflows/shared/pydantic-engine.md with uv install steps
- Remove python.go (uv Go support) and pydantic_engine_test.go
- Revert behavior_defined_engine.go to npm-only install path
- Keep minimal pydantic engine ID registration in Go constants
- Update smoke-pydantic.md to import shared/pydantic-engine.md
- Update docs and tests accordingly

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

@copilot as a shared agentic workflow, not in the go compiler/code

Restructured as a shared agentic workflow. The pydantic installation (uv setup + pydantic-ai[cli] install) now lives in .github/workflows/shared/pydantic-engine.md — consumers just add imports: [shared/pydantic-engine.md] and configure the engine command inline. The python.go uv infrastructure and behavior_defined_engine.go switch have been removed from the compiler. Only the minimal PydanticEngine constant remains in Go so engine: id: pydantic resolves correctly. Done in commits starting with the one that adds shared/pydantic-engine.md.

@pelikhan pelikhan closed this Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants