Skip to content

Conversation

@kujtimiihoxha
Copy link
Member

I was having issues where every time I loaded crush with an oauth provider it was refreshing the token on the first call.

The issue was caused by the API key not having the bearer prefix on initial load.

I refactored the implementation to not rely on the prefix but use the config.

@kujtimiihoxha kujtimiihoxha requested a review from a team as a code owner December 19, 2025 09:59
@kujtimiihoxha kujtimiihoxha requested review from andreynering and tauraamui and removed request for a team December 19, 2025 09:59

switch providerID {
case string(catwalk.InferenceProviderAnthropic):
providerConfig.APIKey = fmt.Sprintf("Bearer %s", newToken.AccessToken)
Copy link
Member

Choose a reason for hiding this comment

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

if we move this before the switch and remove it from line 559, we can close #1677

@caarlos0 caarlos0 merged commit 1c54433 into main Dec 19, 2025
17 checks passed
@caarlos0 caarlos0 deleted the fix-initial-oauth branch December 19, 2025 12:22
mengwong pushed a commit to mengwong/crush that referenced this pull request Dec 24, 2025
M1n9X pushed a commit to M1n9X/crush that referenced this pull request Jan 4, 2026
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.

3 participants