fix: wire AgentGraph to YAML config - #151
Conversation
Updated the Config Pydantic model and YAML schema to include llm and embedding fields. Modified AgentGraph constructor to accept these configurations and updated the chat-chainlit.py entry point to pass them from the loaded configuration. This removes hardcoded 'gpt-4o-mini' and 'text-embedding-3-large' references, making the agent models fully configurable.
|
Thank you @bhavyakeerthi3 — and sorry for the long silence on this one. The gap you identified was real: Two contributors independently reported the same problem within weeks of each other (yours and #112), which was strong evidence it was worth fixing properly rather than patching. Where the implementation differs from yoursI went with #112's nested shape — Your What I did not take: the
|
T025-T027. Both contributed PRs are closed as implemented, each with a comment saying specifically what was taken from it and why the embedding half was not: a query embedded with a different model than built the vectors returns confident nonsense rather than an error, so the model comes from the bundle path and config.yml deliberately cannot name one. Records the two defects writing it found -- pydantic silently ignoring unknown keys, and the same guard being one level too low so a typo in the section name loaded cleanly and did nothing -- and the pattern behind both: the guard was placed on the thing being built rather than on the seam beside it. User Story 3 remains unbuilt on purpose; only chat exists. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Closes #108
Closes #148
Description
This PR addresses the long-standing issue where
AgentGraphhardcoded the LLM and embedding models, ignoring any settings inconfig.yml.First reported in #108, this completes the YAML configurability work by extending it to the most critical parameters.
Changes
llmandembeddingfields toConfiginsrc/util/config_yml/__init__.py.config.schema.yamlandconfig_default.ymlwith safe defaultsAgentGraphconstructor to accept model configs instead of hardcoded stringschat-chainlit.pyto pass YAML-loaded configs to the agentTests Added
Relation to Other PRs
Completes configurability work started in #112 by AaryanCode69, extending it to cover LLM and embedding model parameters which were not included in that PR.