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:05:22 -07:00
parent cb7fb0705b
commit dbaaeea255
21 changed files with 1799 additions and 96 deletions

View file

@ -3,6 +3,8 @@
#
# This source code is licensed under the terms described in the LICENSE file in
# the root directory of this source tree.
from typing import Any
from llama_stack.apis.inference.inference import OpenAICompletion, OpenAICompletionRequest, OpenAIEmbeddingsResponse
from llama_stack.log import get_logger
from llama_stack.providers.remote.inference.llama_openai_compat.config import LlamaCompatConfig
@ -30,6 +32,7 @@ class LlamaCompatInferenceAdapter(OpenAIMixin):
async def openai_completion(
self,
params: OpenAICompletionRequest,
**kwargs: Any,
) -> OpenAICompletion:
raise NotImplementedError()
@ -40,5 +43,6 @@ class LlamaCompatInferenceAdapter(OpenAIMixin):
encoding_format: str | None = "float",
dimensions: int | None = None,
user: str | None = None,
**kwargs: Any,
) -> OpenAIEmbeddingsResponse:
raise NotImplementedError()