Skip to content

Conversation

@jeesonwang
Copy link
Contributor

@jeesonwang jeesonwang commented Sep 30, 2025

PR Description
Problem:
The authorization header setup in the TextEmbeddingsInference class had inconsistent handling of authentication tokens. When auth_token was callable, it wasn't being properly processed before setting the Authorization header.
Solution:
Refactored the authorization header setup logic to:
Properly handle callable authentication tokens by invoking them with the base URL parameter
Extract the actual token value (whether from callable or static source)
Consistently format the Authorization header with the "Bearer" prefix
Changes:
Modified the token processing logic in base.py to ensure correct token extraction
Added proper handling for both callable and static authentication tokens
Ensured consistent Bearer token formatting in the Authorization header
Impact:
This fix ensures reliable authentication for the TextEmbeddingsInference integration, preventing potential authentication failures when using callable token providers.

…sure correct handling of callable authentication tokens.
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Sep 30, 2025
@jeesonwang jeesonwang changed the title Fix authorization header setup logic in text embedded reasoning to en… Fix authorization header setup logic in text embeddings inference Sep 30, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 2, 2025
@logan-markewich logan-markewich merged commit cec9634 into run-llama:main Oct 2, 2025
10 of 11 checks passed
@jeesonwang jeesonwang deleted the acall_api_fix branch October 3, 2025 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants