Welcome to Portkey Forum

Updated 2 weeks ago

Missing model name in response

I was able to get it to work via following schema:
"virtual_key": "xxxxxxxxxxx",
"override_params": {
"model": "anthropic.claude-3-7-sonnet-20250219-v1:0"
}

but when the response is returned from the server model field is empty.

e.g.
Plain Text
{
    "id": "1740523845732",
    "choices": [
        {
            "finish_reason": "max_tokens",
            "index": 0,
            "logprobs": null,
            "message": {
                "content": "{\n    \"description\": \"A Portkey is a magical object in the Harry Potter universe that has been enchanted to instantly transport anyone who touches it to a specific predetermined destination. It can be any ordinary object (like an old boot, newspaper, or bottle) that has been spelled to transport wizards an",
                "role": "assistant",
                "function_call": null,
                "tool_calls": null,
                "refusal": null,
                "audio": null
            }
        }
    ],
    "created": 1740523845,
    "model": "",
    "object": "chat.completion",
    "system_fingerprint": null,
    "usage": {
        "prompt_tokens": 25,
        "completion_tokens": 64,
        "total_tokens": 89,
        "completion_tokens_details": null,
        "prompt_tokens_details": null
    },
    "service_tier": null,
    "provider": "bedrock"
}


so I am unsure how will know which model among the multiple options of fallback was called.
s
1 comment
This is expected @Arya some of the providers do not return model name in the response. We could infer this from request params, but we haven’t done it so far
Add a reply
Sign up and join the conversation on Discord