microsoft / microsoft/azurechat
No Model Name issue
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.4k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 1
Description
While using the ChatCompletionsClient everything seems to be working properly, but when I make use of the AzureAIChatCompletionsModel, using the below documentation.
https://learn.microsoft.com/en-us/azure/ai-studio/how-to/develop/langchain
and code:
import os
from langchain_azure_ai.chat_models import AzureAIChatCompletionsModel
from langchain_core.messages import HumanMessage, SystemMessage
model = AzureAIChatCompletionsModel(
endpoint={endpoint},
credential={api}
# added the model_name here before but it doesn't seem to work
)
messages = [
SystemMessage(content="Translate the following from English into Italian"),
HumanMessage(content="hi!"),
]
resp = model.invoke(messages) #here is throws straight up error, "model_name" arg not expected
print(resp)
Below Error is getting generated:
raise HttpResponseError(response=response)
azure.core.exceptions.HttpResponseError: (no_model_name) No model specified in request. Please provide a model name in the request body or as a x-ms-model-mesh-model-name header.
Code: no_model_name
Message: No model specified in request. Please provide a model name in the request body or as a x-ms-model-mesh-model-name header.
I understand it is expecting a model_name somewhere, but can someone help me with where should I exactly feed it.
I wanted to make use of the "DeepSeek-R1" that I have deployed on AI-Foundry, and want to use with langchain to create a RAG Pipeline.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Azure AI Studio documentation and the AzureAIChatCompletionsModel constructor and invocation shown in the report. Trace how the deployed DeepSeek-R1 model should be represented in the request, then verify that model.invoke(messages) completes without the no_model_name error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, python
- Domain
- ai, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100