-
Notifications
You must be signed in to change notification settings - Fork 223
Description
Bug Description
I've identified a critical design flaw in the public_evaluations branch that prevents running evaluations with custom embedding models (e.g., OpenAI). The mirixAgent class is hardcoded to initialize GoogleGenAIEmbedding for memory/embedding tasks, completely ignoring the embedding_provider and related settings in the YAML configuration file.
This makes it impossible to correctly run the locomo benchmark as described in the README if one intends to use a unified provider (like OpenAI) for both chat and embedding functionalities.
Symptom Progression
The issue manifests in a series of misleading steps:
- Initial Attempt: Following the
README.md, I configured acustom_openai.yamlto use OpenAI as themodel_providerand ran the evaluation. - Illusion of API Success: My API proxy logs showed successful calls to the OpenAI chat completion endpoint (e.g.,
gpt-4.1-mini). - Incorrect Result File: Despite the successful chat API calls, the generated
results.jsoncontained"ERROR_RESPONSE_FAILED"for all answers. - Unit Test Reveals Truth: A minimal test script revealed that the program was crashing before even calling the chat API. The error log pointed directly to a failure in initializing
GoogleGenAIEmbeddingdue to a missing Google API Key. - Configuration Changes Ineffective: Explicitly adding
embedding_provider: openaiandembedding_model_nameto the YAML file had no effect. The error persisted, proving that these configuration fields are being ignored by the code.
Root Cause Analysis
The root of the problem lies in the __init__ method of the mirixAgent class, located in mirix/agent/agent_wrapper.py.
- The code correctly parses the
model_providerfor the Chat functionality from the YAML config. - However, it lacks any logic to read the
embedding_providerorembedding_model_namefields for the Memory/Embedding functionality.
Due to the missing configuration intake, the code falls back to its hardcoded default, which is GoogleGenAIEmbedding. This forces the requirement for a Google API Key and causes the crash when it's not present.
Suggested Solution
To properly fix this bug, the __init__ method of the mirixAgent class needs to be modified to:
- Add logic to correctly parse the
embedding_providerandembedding_model_namefields from the YAML configuration. - Based on this configuration, initialize the corresponding embedding client (e.g.,
OpenAIEmbeddingwhenopenaiis specified).
Thank you for developing this incredible framework. I'm looking forward to getting the evaluation running correctly and continuing my research based on it. Let me know if any more information is needed!