Skip to content

fix: wire AgentGraph to YAML config#151

Open
bhavyakeerthi3 wants to merge 2 commits intoreactome:mainfrom
bhavyakeerthi3:fix/yaml-config-clean
Open

fix: wire AgentGraph to YAML config#151
bhavyakeerthi3 wants to merge 2 commits intoreactome:mainfrom
bhavyakeerthi3:fix/yaml-config-clean

Conversation

@bhavyakeerthi3
Copy link
Copy Markdown

Closes #108
Closes #148

Description

This PR addresses the long-standing issue where AgentGraph hardcoded the LLM and embedding models, ignoring any settings in config.yml.
First reported in #108, this completes the YAML configurability work by extending it to the most critical parameters.

Changes

  • Added llm and embedding fields to Config in src/util/config_yml/__init__.py
  • Updated .config.schema.yaml and config_default.yml with safe defaults
  • Updated AgentGraph constructor to accept model configs instead of hardcoded strings
  • Updated chat-chainlit.py to pass YAML-loaded configs to the agent

Tests Added

def test_config_loads_llm_and_embedding(mock_config_file):
    config = Config.from_yaml(mock_config_file)
    assert config.llm == "gpt-4o-mini"
    assert config.embedding == "text-embedding-3-large"

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.

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.
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.

bug: AgentGraph hardcodes LLM and embedding models — ignores YAML configuration refactor: Make LLM and Embedding Model Configurable via YAML

1 participant