plano/tests/rest/api_prompt_gateway.rest
Salman Paracha 2941392ed1
Adding support for wildcard models in the model_providers config (#696)
* cleaning up plano cli commands

* adding support for wildcard model providers

* fixing compile errors

* fixing bugs related to default model provider, provider hint and duplicates in the model provider list

* fixed cargo fmt issues

* updating tests to always include the model id

* using default for the prompt_gateway path

* fixed the model name, as gpt-5-mini-2025-08-07 wasn't in the config

* making sure that all aliases and models match the config

* fixed the config generator to allow for base_url providers LLMs to include wildcard models

* re-ran the models list utility and added a shell script to run it

* updating docs to mention wildcard model providers

* updated provider_models.json to yaml, added that file to our docs for reference

* updating the build docs to use the new root-based build

---------

Co-authored-by: Salman Paracha <salmanparacha@MacBook-Pro-342.local>
2026-01-28 17:47:33 -08:00

116 lines
2.2 KiB
ReStructuredText

@prompt_endpoint = http://localhost:10000
### prompt gateway request
POST {{prompt_endpoint}}/v1/chat/completions HTTP/1.1
Content-Type: application/json
{
"messages": [
{
"role": "user",
"content": "how is the weather in seattle for next 10 days"
}
]
}
### prompt gateway request default target
POST {{prompt_endpoint}}/v1/chat/completions HTTP/1.1
Content-Type: application/json
{
"messages": [
{
"role": "user",
"content": "hello"
}
]
}
### prompt gateway request (streaming)
POST {{prompt_endpoint}}/v1/chat/completions HTTP/1.1
Content-Type: application/json
{
"messages": [
{
"role": "user",
"content": "how is the weather in seattle for next 10 days"
}
],
"stream": true
}
### prompt gateway request param gathering
POST {{prompt_endpoint}}/v1/chat/completions HTTP/1.1
Content-Type: application/json
{
"messages": [
{
"role": "user",
"content": "how is the weather in seattle"
}
]
}
### prompt gateway request param gathering and function calling
POST {{prompt_endpoint}}/v1/chat/completions HTTP/1.1
Content-Type: application/json
{
"messages": [
{
"role": "user",
"content": "how is the weather in seattle"
},
{
"role": "assistant",
"content": "It seems I'm missing some information. Could you provide the following details days ?",
"model": "Arch-Function"
},
{
"role": "user",
"content": "for next 10 days"
}
]
}
### prompt gateway request param gathering and function calling (streaming)
POST {{prompt_endpoint}}/v1/chat/completions HTTP/1.1
Content-Type: application/json
{
"model": "gpt-4o",
"messages": [
{
"role": "user",
"content": "how is the weather in seattle"
},
{
"role": "assistant",
"content": "It seems I'm missing some information. Could you provide the following details days ?",
"model": "Arch-Function"
},
{
"role": "user",
"content": "for next 10 days"
}
],
"stream": true
}
### currency conversion test
POST {{prompt_endpoint}}/v1/chat/completions HTTP/1.1
Content-Type: application/json
{
"model": "--",
"messages": [
{
"role": "user",
"content": "can you please convert 100 jpy"
}
]
}