-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
App Version
3.19.3
API Provider
LiteLLM
Model Used
bedrock-us.anthropic.claude-3-7-sonnet-20250219-v1:0
🔁 Steps to Reproduce
Description
When configuring Roo Code to connect to a LiteLLM server with a base URL that includes a trailing slash, the connection fails because the API endpoint is constructed incorrectly, resulting in a double slash in the URL path.
Steps to Reproduce
- Open Roo Code
- Click on the Settings icon (gear) in the Roo Code panel header
- Select "Providers" from the settings menu
- Click "API Provider"
- Select "LiteLLM" from the provider dropdown
- In the "Base URL" field, enter a URL with a trailing slash (e.g., "http://localhost:4000/")
- Enter your API key in the "API Key" field
- Click "Save"
- Click "Refresh Models"
- Observe the error "Failed to fetch LiteLLM models: 404 Not Found. Check base URL and API key."
Expected Behavior
Roo Code should successfully connect to the LiteLLM server regardless of whether the base URL contains a trailing slash.
Actual Behavior
The connection fails because the API endpoint is constructed as "http://localhost:4000//v1/model/info" (note the double slash), which is not a valid URL path.
Additional Information
This issue occurs because the base URL is directly concatenated with the endpoint path without checking for or handling trailing slashes, resulting in malformed URLs when users include a trailing slash in their configuration.
💥 Outcome Summary
Expected to connect to corporate LiteLLM gateway, but got a 404 Not Found Error instead. Credentials were valid.
📄 Relevant Logs or Errors (Optional)
Failed to fetch LiteLLM models: 404 Not Found. Check base URL and API key.Metadata
Metadata
Assignees
Labels
Type
Projects
Status