Internal server error for role orders in LLM inference
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by tracing the validation that produces the quoted role-order and last-message errors, then reproduce a request with continuation or agent-observation messages. Done means supported non-alternating role sequences no longer return HTTP 500 while the intended validation behavior remains covered.
Written by the indexing model from the issue text.
Description
Hi,
I am getting 500s with description
chat messages must alternate roles between 'user' and 'assistant'. Message may have a leading 'system' role message
and
"Internal Server Error\",\"status\":500,\"detail\":\"Last message role should be 'user'
I think this order validation is unnecessary. Most of the models (e.g. mixtrals, llama3, gemma etc) are perfectly fine with any order of roles. This claim can be validated on groq's playground: https://console.groq.com/playground
This issue currently breaks some existing patterns, like continuations (without the user explicitly saying "continue") or in some cases running agents with observations etc.
- Dominant language
- Jupyter Notebook
- Stars
- 4.2k
- Forks
- 1.1k
- Avg merge
- 10h 15m
- Merged PRs (30d)
- 1
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.
More from NVIDIA/GenerativeAIExamples
-
Difficulty 1/5 Under an hour Newbie friendliness 70/100
NVIDIA/GenerativeAIExamples#361 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
NVIDIA/GenerativeAIExamples#299 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
NVIDIA/GenerativeAIExamples#437 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 45/100
NVIDIA/GenerativeAIExamples#400 ·
-
Difficulty 5/5 Over a week Newbie friendliness 10/100
NVIDIA/GenerativeAIExamples#399 ·
All issues in NVIDIA/GenerativeAIExamples
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
run-llama/llama_index#23199 ·
-
p:2-high pydanty:bug
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
pydantic/pydantic-ai#8642 · 2 comments ·
-
bug untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
opensearch-project/ml-commons#5094 ·
-
bug external groq
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
langchain-ai/langchain#40771 · 1 comment ·
-
ai-observability bug team/ai-observability
Difficulty 2/5 1-3 hours Newbie friendliness 78/100