fix: add missing LLM_PROVIDER and MODEL_NAME to pydantic-ai .env.example#11
Open
brone1323 wants to merge 1 commit into
Open
fix: add missing LLM_PROVIDER and MODEL_NAME to pydantic-ai .env.example#11brone1323 wants to merge 1 commit into
brone1323 wants to merge 1 commit into
Conversation
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.
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pydantic-ai/main.pyreads two env vars that were absent from.env.example:LLM_PROVIDER— selects the backend (openai/anthropic/gemini); defaults to"openai"silentlyMODEL_NAME— optional per-provider model overrideWithout these in the template, a user copying
.env.exampleto.envwould:Changes
LLM_PROVIDERandMODEL_NAMEwith inline comments explaining accepted values and defaultsGITHUB_TOKENexplaining why it is requiredTest plan
.env.exampleto.env, fill in one API key, runpython main.py-- should work without readingmain.pysourceLLM_PROVIDER=anthropic, fillANTHROPIC_API_KEY, run -- should use Anthropic without any code changesGenerated with Claude Code