Replies: 5 comments
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
This is definitely a bug. Thanks for the report it's been passed on to the team. |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for reporting this! Could you provide more information about how you're using this endpoint? Are you using an SDK or crafting these URL's yourself? If you have control over the URL you're using in the request try changing it to If using an SDK, which one? |
Beta Was this translation helpful? Give feedback.
-
|
I am using the Cohere AI SDK the endpoint that I was using was https://models.github.ai/inference |
Beta Was this translation helpful? Give feedback.
-
|
Thank you! I'm able to recreate the error using the Cohere AI SDK. A workaround for the time being would be to use the Azure AI Inference SDK for python An example that I was able to confirm worked:
import os
from azure.ai.inference import EmbeddingsClient
from azure.core.credentials import AzureKeyCredential
endpoint = "https://models.github.ai/inference"
model_name = "cohere/Cohere-embed-v3-english"
token = os.environ["GITHUB_TOKEN"]
client = EmbeddingsClient(
endpoint=endpoint,
credential=AzureKeyCredential(token)
)
response = client.embed(
input=["first phrase", "second phrase", "third phrase"],
model=model_name
)
for item in response.data:
length = len(item.embedding)
print(
f"data[{item.index}]: length={length}, "
f"[{item.embedding[0]}, {item.embedding[1]}, "
f"..., {item.embedding[length-2]}, {item.embedding[length-1]}]"
)
print(response.usage) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Bug
Body
Issue Description
When attempting to use the GitHub AI Inference API with the Cohere embedding model, I'm receiving a 404 "page not found" error. The issue appears to be that the endpoint URL is auto-redirecting to
/v1/embedwhen it should redirect to/v3/embedfor the Cohere v3 model.Expected Behavior
The API should automatically redirect to the correct version endpoint (
/v3/embed) for the Cohere v3 embedding model, or properly handle the request at the v1 endpoint.Actual Behavior
The API auto-redirects to
/v1/embedinstead of/v3/embed, resulting in a 404 error with the message "404 page not found".API Details
https://models.github.ai/inferencecohere/Cohere-embed-v3-english/v1/embed/v3/embedhttps://models.github.ai/inference/v1/embedError Response
{ "ok": false, "error": { "reason": "non-json", "statusCode": 404, "rawBody": "404 page not found\n" } }Root Cause
The endpoint routing logic appears to be incorrectly auto-redirecting all embedding requests to the v1 API endpoint, regardless of the model version specified. For Cohere v3 models, requests should be routed to the v3 endpoint.
Questions
Is the auto-redirect behavior intentional, and should v1 endpoints support v3 models?
Is there a way to explicitly specify the API version in the request to bypass the auto-redirect?
Are there updated documentation or examples for using Cohere v3 models with the GitHub AI Inference service?
Beta Was this translation helpful? Give feedback.
All reactions