feat(llm): add configurable GenerationParams across agent runners#319
Open
Sagar-CK wants to merge 1 commit into
Open
feat(llm): add configurable GenerationParams across agent runners#319Sagar-CK wants to merge 1 commit into
Sagar-CK wants to merge 1 commit into
Conversation
Collaborator
|
@Sagar-CK It seems that too many changes are coming along. This is potentially due to formatting. Will it be okay if you disable formatting for this PR, and maybe we can make a pass to reformat all the files with standard formatting? |
DhavalRepo18
requested changes
May 22, 2026
Collaborator
DhavalRepo18
left a comment
There was a problem hiding this comment.
Submit code without Python code formatting.
Collaborator
|
@Sagar-CK I left few comment. |
Signed-off-by: Sagar Chethan Kumar <sagar.chethankumar@gmail.com>
5533df0 to
98d2115
Compare
Author
|
@DhavalRepo18 have updated the PR, tests still pass, let me know. |
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.
Description
Standardizes LLM generation configuration across all agent runners and the LiteLLM backend. Replaces hardcoded values (e.g.
max_tokens=2048) with a shared, env-drivenGenerationParamsdataclass and per-SDK mappers.Problem
LiteLLMBackendhardcodedmax_tokens=2048with no override pathtemperaturewas the only tunable param; no shared place fortop_p,stop, etc.Solution
GenerationParams(src/llm/generation.py) with env defaults viaLLM_*varsLLMBackend.generate(..., *, params=)with merge semantics (env → ctor → per-call;temperature=always wins)ClaudeAgentOptions(effort/thinking), OpenAIModelSettings, LangChainChatOpenAIEnv vars (documented in
.env.public):LLM_MAX_TOKENS(default: 4096)LLM_TEMPERATURE(default: 0.0)LLM_TOP_P,LLM_STOP,LLM_REASONING_EFFORT,LLM_THINKING_BUDGET_TOKENSType of Change
Related Issues
Testing & Validation
uv run pytest src/ -v -k "not integration"— 357 passed