Conversation
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
…roviders Fixes #68 Providers that inherit from OpenAI-compatible parent classes (OpenRouter, DeepSeek, XAI, and STT Groq) were ignoring `api_key` passed via the config dict. This happened because they checked for `api_key` before the config dict was unpacked by the base class's `__post_init__`. The fix manually extracts `api_key` and `base_url` from the config dict before setting provider-specific defaults, ensuring config values take precedence. Fixed providers: - LLM: openrouter, deepseek, xai - STT: groq Added regression tests for config dict initialization.
633260a to
9bb2bd1
Compare
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
api_keyfrom config dict #68: OpenRouter (and other OpenAI-based providers) were ignoringapi_keypassed via the config dictRoot Cause
Providers that inherit from OpenAI-compatible parent classes were checking for
api_keybefore the config dict was unpacked by the base class's__post_init__. Additionally, when callingsuper().__post_init__()first, the parent OpenAI class would set its own defaults before the child provider could set its own.Fix
For providers that inherit from OpenAI-compatible parent classes, manually extract
api_keyandbase_urlfrom the config dict before setting provider-specific defaults:Test plan
test_initialization_with_api_key_in_configtest_initialization_with_base_url_in_configtest_initialization_with_api_key_and_base_url_in_config