Skip to content

fix: add missing LLM_PROVIDER and MODEL_NAME to pydantic-ai .env.example#11

Open
brone1323 wants to merge 1 commit into
archestra-ai:mainfrom
brone1323:fix/pydantic-ai-env-example-missing-vars
Open

fix: add missing LLM_PROVIDER and MODEL_NAME to pydantic-ai .env.example#11
brone1323 wants to merge 1 commit into
archestra-ai:mainfrom
brone1323:fix/pydantic-ai-env-example-missing-vars

Conversation

@brone1323

Copy link
Copy Markdown

Summary

pydantic-ai/main.py reads two env vars that were absent from .env.example:

  • LLM_PROVIDER — selects the backend (openai / anthropic / gemini); defaults to "openai" silently
  • MODEL_NAME — optional per-provider model override

Without these in the template, a user copying .env.example to .env would:

  1. Have no idea they can switch providers without editing source code
  2. Not know which default model each provider falls back to

Changes

  • Added LLM_PROVIDER and MODEL_NAME with inline comments explaining accepted values and defaults
  • Added a comment to the key block clarifying only the key for the chosen provider is needed
  • Added a comment to GITHUB_TOKEN explaining why it is required

Test plan

  • Copy .env.example to .env, fill in one API key, run python main.py -- should work without reading main.py source
  • Set LLM_PROVIDER=anthropic, fill ANTHROPIC_API_KEY, run -- should use Anthropic without any code changes

Generated with Claude Code

main.py reads LLM_PROVIDER (to select openai/anthropic/gemini) and
MODEL_NAME (optional model override) from the environment, but neither
variable appeared in .env.example. A new user copying the template
would default to OpenAI silently and have no hint that they need to
change LLM_PROVIDER to switch providers or which models are the defaults.

Also add inline comments so each variable is self-documenting.
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

2 participants