Skip to content

Conversation

@ctfliblime
Copy link

@ctfliblime ctfliblime commented Oct 8, 2025

Currently, to have embedding and completion hit two distinct API base URLs, you have to define the embedding base in the environment variable and set the completion base in the toml config. This patch obviates the need to use the environment at all and allows setting api_base and api_key in the config for embedding, as well.


Important

Allow setting api_base and api_key in EmbeddingConfig, removing the need for environment variables.

  • Behavior:
    • Allows setting api_base and api_key in EmbeddingConfig in embedding.py.
    • Updates _get_embedding_kwargs() in litellm.py to include api_base and api_key if set in the config.
  • Misc:
    • Removes the requirement to use environment variables for embedding API configuration.

This description was created by Ellipsis for 4d986fa. You can customize this summary. It will automatically update as commits are pushed.

Currently, to have embedding and completion hit two distinct
API base URLs, you have to define the embedding base in the
environment variable and set the completion base in the toml
config. This patch obviates the need to use the environment
at all and allows setting api_base and api_key in the config
for embedding, as well.
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

Important

Looks good to me! 👍

Reviewed everything up to 4d986fa in 50 seconds. Click for details.
  • Reviewed 28 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. py/core/base/providers/embedding.py:32
  • Draft comment:
    New fields 'api_base' and 'api_key' are added. Consider adding inline comments or updating the class docstring to describe their usage and behavior.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. py/core/providers/embeddings/litellm.py:72
  • Draft comment:
    The config values for 'api_base' and 'api_key' are passed into the kwargs. Note that kwargs.update() later allows caller-supplied values to override these config settings—ensure this ordering is intentional and document it if needed.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None

Workflow ID: wflow_DXZQ97mJgizgebty

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

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.

2 participants