Ensure runtime options are passed

This commit is contained in:
Nicolas Mowen 2026-05-19 08:33:01 -06:00
parent b1de5e2290
commit 75f6971f13
3 changed files with 4 additions and 0 deletions

View File

@ -115,6 +115,7 @@ class OpenAIClient(GenAIClient):
"model": self.genai_config.model, "model": self.genai_config.model,
"messages": messages, "messages": messages,
"timeout": self.timeout, "timeout": self.timeout,
**self.genai_config.runtime_options,
} }
if tools: if tools:
@ -212,6 +213,7 @@ class OpenAIClient(GenAIClient):
"timeout": self.timeout, "timeout": self.timeout,
"stream": True, "stream": True,
"stream_options": {"include_usage": True}, "stream_options": {"include_usage": True},
**self.genai_config.runtime_options,
} }
if tools: if tools:

View File

@ -527,6 +527,7 @@ class LlamaCppClient(GenAIClient):
k: v for k, v in self.provider_options.items() if k != "context_size" k: v for k, v in self.provider_options.items() if k != "context_size"
} }
payload.update(provider_opts) payload.update(provider_opts)
payload.update(self.genai_config.runtime_options)
return payload return payload
def _message_from_choice(self, choice: dict[str, Any]) -> dict[str, Any]: def _message_from_choice(self, choice: dict[str, Any]) -> dict[str, Any]:

View File

@ -309,6 +309,7 @@ class OllamaClient(GenAIClient):
"model": self.genai_config.model, "model": self.genai_config.model,
"messages": request_messages, "messages": request_messages,
**self.provider_options, **self.provider_options,
**self.genai_config.runtime_options,
} }
if stream: if stream:
request_params["stream"] = True request_params["stream"] = True