Bug Description
Requests to /v1/responses fail with 404 model_not_found when using the short model name grok-4, but succeed when using the fully-qualified version grok-4-0709. If grok-4 is intended as an alias for the latest grok-4-* build, the alias is not being resolved. If aliases are not supported, the error message is misleading (it implies no worker is available for the model at all).
Related PR: #1117
Steps to Reproduce
Run SMG locally on port 9999, then call /v1/responses with "model": "grok-4":
curl -i http://localhost:9999/v1/responses \
-H "Content-Type: application/json" \
-H "opc-conversation-store-id: test-store-0326-01" \
-H "Authorization: Bearer " \
-d '{
"model": "grok-4",
"input": "Tell me about quang nam, vietnam"
}'
Actual Behavior
HTTP/1.1 404 Not Found
content-type: application/json
x-smg-error-code: model_not_found
x-request-id: resp-1um1xAt9dH6i7K06DF1rDO0H
{"error":{"type":"Not Found","code":"model_not_found","message":"No worker available for model 'grok-4'","param":null}}
Expected Behavior
The request should resolve grok-4 which maps to latest grok model in the same family like it call xAI directly, and return 200 OK, similar to what happens when the full model name is sent explicitly:
curl -i http://localhost:9999/v1/responses \
-H "Content-Type: application/json" \
-H "opc-conversation-store-id: test-store-0326-01" \
-H "Authorization: Bearer " \
-d '{
"model": "grok-4",
"input": "Tell me about quang nam, vietnam"
}'
HTTP/1.1 200 OK
content-type: application/json
x-request-id: resp-r0QcepBPFqZTRTS7fml8XePJ
{"created_at":1776116496,"completed_at":1776116510,"id":"2ad40d62-c655-d5c3-e03b-ffe19aa3fceb","model":"grok-4-0709","object":"response","output":[{"content":[{"type":"output_text","text":"### Overview of Quang Nam Province, Vietnam\n\nQuang Nam (often spelled Quảng Nam in Vietnamese) is a coastal province in central Vietnam..."}]}]}
Actual Behavior
HTTP/1.1 404 Not Found
content-type: application/json
x-smg-error-code: model_not_found
x-request-id: resp-1um1xAt9dH6i7K06DF1rDO0H
{"error":{"type":"Not Found","code":"model_not_found","message":"No worker available for model 'grok-4'","param":null}}
Component
model-gateway (core routing)
Routing Policy (if applicable)
None
Environment
- SMG: local build, port 9999
- Endpoint:
/v1/responses
Deployment Environment
Local development
Streaming Context
Additional Context
No response
Pre-submission Checklist
Bug Description
Requests to
/v1/responsesfail with404 model_not_foundwhen using the short model namegrok-4, but succeed when using the fully-qualified versiongrok-4-0709. Ifgrok-4is intended as an alias for the latestgrok-4-*build, the alias is not being resolved. If aliases are not supported, the error message is misleading (it implies no worker is available for the model at all).Related PR: #1117
Steps to Reproduce
Run SMG locally on port 9999, then call
/v1/responseswith"model": "grok-4":Actual Behavior
Expected Behavior
The request should resolve
grok-4which maps to latest grok model in the same family like it call xAI directly, and return200 OK, similar to what happens when the full model name is sent explicitly:Actual Behavior
Component
model-gateway (core routing)
Routing Policy (if applicable)
None
Environment
/v1/responsesDeployment Environment
Local development
Streaming Context
Additional Context
No response
Pre-submission Checklist