Bug: “no implicit conversion of String into Integer” when using Together AI with Fetch Available Models #2956
Unanswered
xpertizeafrica
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi CrewAI team,
I'm encountering a bug when trying to set up a custom openai-compatible connection using Together AI.
Bug Description
When I click the “Fetch Available Models” button after setting the following environment variables:
OPENAI_API_KEY=tgp_v1_...
OPENAI_API_BASE=https://api.together.xyz/v1
…I get the following error:
no implicit conversion of String into Integer
What I’ve Confirmed
The Together AI API is fully working — I tested /v1/chat/completions with the model meta-llama/Llama-3.3-70B-Instruct-Turbo and received a valid completion.
Environment variables are correct.
The bug only occurs when trying to fetch the model list from the CrewAI UI.
Likely Cause
Together AI’s /v1/models endpoint returns a dictionary with string keys, not an array. It looks something like:
json
{
"data": {
"meta-llama/Llama-3.3-70B-Instruct-Turbo": {...},
...
}
}
It seems CrewAI assumes the response is indexable like an array, causing the type error.
Let me know if you’d like logs or a sample API response. Thanks for the great tool — just hoping to help make Together AI integration smoother!
Best,
Naim
Beta Was this translation helpful? Give feedback.
All reactions