Skip to content

Commit d0e0728

Browse files
committed
Downgrade pydantic check to warning; agent installs it if missing
1 parent 8cfcf4c commit d0e0728

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

codegen-llm/src/codegen.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,17 +160,19 @@ function validatePrerequisites(opts: CodegenOptions): void {
160160
);
161161
}
162162

163-
// Check Python + pydantic are available
163+
// Check Python + pydantic are available. Not fatal — the Codex agent has
164+
// full access and can install pydantic itself during the run.
164165
try {
165166
const version = execSync(
166167
'python3 -c "import pydantic; print(pydantic.VERSION)"',
167168
{ encoding: "utf8", stdio: ["pipe", "pipe", "pipe"] },
168169
).trim();
169170
log(opts, `Found pydantic ${version}`);
170171
} catch {
171-
throw new Error(
172-
"Python 3 with pydantic >= 2.9.0 is required.\n" +
173-
"Install with: pip install 'pydantic>=2.9.0'",
172+
console.warn(
173+
"Warning: pydantic not found on the host Python.\n" +
174+
"The Codex agent will attempt to install it, but you can also run:\n" +
175+
" pip install 'pydantic>=2.9.0'",
174176
);
175177
}
176178
}

codegen-llm/src/prompts.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,9 @@ This script:
194194
195195
## Process
196196
197+
0. First, make sure pydantic is installed:
198+
\`pip install 'pydantic>=2.9.0'\`
199+
(Skip if it's already available.)
197200
1. Start by reading the service registry in the TypeScript source to get the
198201
full list of services.
199202
2. Read the TypeScript source for a few representative services to understand

0 commit comments

Comments
 (0)