Skip to content

fix: honor embedding api_key from config dict across providers#83

Merged
lfnovo merged 1 commit intomainfrom
codex/fix-embedding-api-key-config-resolution
Feb 12, 2026
Merged

fix: honor embedding api_key from config dict across providers#83
lfnovo merged 1 commit intomainfrom
codex/fix-embedding-api-key-config-resolution

Conversation

@lfnovo
Copy link
Owner

@lfnovo lfnovo commented Feb 12, 2026

Summary

  • fix API key resolution in embedding providers to honor config-resolved values before env fallback
  • apply the fix to OpenAI, Google, Jina, and Voyage embedding providers
  • bump package version to 2.19.1
  • add changelog entry for the fix
  • add regression tests for config={"api_key": "..."} initialization paths

Why

Some users passed API keys via config (e.g. through factory methods) and still got API key not found in embedding providers due to provider-specific init overriding resolved credentials.

Validation

  • uv run pytest -q tests/providers/embedding/test_embedding_providers.py -k "openai_initialization_with_config_api_key or google_initialization_with_config_api_key"
  • uv run pytest -q tests/providers/embedding/test_jina.py -k "config_api_key or init_with_api_key or init_with_env_var or init_without_api_key"
  • uv run pytest -q tests/providers/embedding/test_voyage_provider.py -k "config_api_key or init_with_api_key or init_with_env_api_key or init_without_api_key"

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 9 files

@lfnovo lfnovo merged commit 642f6be into main Feb 12, 2026
6 checks passed
@lfnovo lfnovo deleted the codex/fix-embedding-api-key-config-resolution branch February 12, 2026 10:23
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.

1 participant