featu: support passing "extra body" throught to providers

# What does this PR do?
Allows passing through extra_body parameters to inference providers.


closes #2720

## Test Plan
CI and added new test
This commit is contained in:
Eric Huang 2025-10-10 15:53:56 -07:00
parent 80d58ab519
commit 28dff0b89e
37 changed files with 2964 additions and 200 deletions

View file

@ -1527,7 +1527,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OpenAIChatCompletionRequest"
"$ref": "#/components/schemas/OpenAIChatCompletionRequestWithExtraBody"
}
}
},
@ -1617,7 +1617,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OpenAICompletionRequest"
"$ref": "#/components/schemas/OpenAICompletionRequestWithExtraBody"
}
}
},
@ -7522,7 +7522,7 @@
"title": "OpenAIResponseFormatText",
"description": "Text response format for OpenAI-compatible chat completion requests."
},
"OpenAIChatCompletionRequest": {
"OpenAIChatCompletionRequestWithExtraBody": {
"type": "object",
"properties": {
"model": {
@ -7769,7 +7769,7 @@
"model",
"messages"
],
"title": "OpenAIChatCompletionRequest",
"title": "OpenAIChatCompletionRequestWithExtraBody",
"description": "Request parameters for OpenAI-compatible chat completion endpoint."
},
"OpenAIChatCompletion": {
@ -7966,7 +7966,7 @@
],
"title": "OpenAICompletionWithInputMessages"
},
"OpenAICompletionRequest": {
"OpenAICompletionRequestWithExtraBody": {
"type": "object",
"properties": {
"model": {
@ -8097,17 +8097,6 @@
"type": "string",
"description": "(Optional) The user to use."
},
"guided_choice": {
"type": "array",
"items": {
"type": "string"
},
"description": "(Optional) vLLM-specific parameter for guided generation with a list of choices."
},
"prompt_logprobs": {
"type": "integer",
"description": "(Optional) vLLM-specific parameter for number of log probabilities to return for prompt tokens."
},
"suffix": {
"type": "string",
"description": "(Optional) The suffix that should be appended to the completion."
@ -8118,7 +8107,7 @@
"model",
"prompt"
],
"title": "OpenAICompletionRequest",
"title": "OpenAICompletionRequestWithExtraBody",
"description": "Request parameters for OpenAI-compatible completion endpoint."
},
"OpenAICompletion": {