Skip to content

Commit fddfa45

Browse files
refactor: simplify embedding connection test by removing unused endpoint param
The endpoint parameter was never used for embedding models, only for LLMs. Remove it from _test_embedding_connection
1 parent cfad66a commit fddfa45

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

apps/backend/src/rhesis/backend/app/services/model_connection.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -179,23 +179,17 @@ def _test_language_model_connection(
179179

180180
@staticmethod
181181
def _test_embedding_connection(
182-
provider: str, model_name: str, api_key: str, endpoint: str | None = None
182+
provider: str, model_name: str, api_key: str | None = None
183183
) -> ModelConnectionTestResult:
184184
"""Test an embedding model connection."""
185185
try:
186186
from rhesis.sdk.models.factory import EmbeddingModelConfig, get_embedding_model
187187

188-
# Build extra params for providers that need them
189-
extra_params = {}
190-
if endpoint:
191-
extra_params["base_url"] = endpoint
192-
193188
# Create embedder config
194189
config = EmbeddingModelConfig(
195190
provider=provider,
196191
model_name=model_name,
197192
api_key=api_key,
198-
extra_params=extra_params,
199193
)
200194

201195
# Try to create the embedder instance

0 commit comments

Comments
 (0)