Move system_instruction into LLMSettings

Add `system_instruction` field to `LLMSettings` so it is runtime-updatable via settings.
For Google (GoogleLLMService, GoogleVertexLLMService), deprecate the init-time arg since it was already shipped. For Anthropic, AWS Bedrock, and OpenAI, remove the init-time arg entirely since it was never shipped.

Still need to handle realtime services (OpenAI Realtime, Grok Realtime, Gemini Live).
This commit is contained in:
Paul Kompfner
2026-03-05 14:03:32 -05:00
parent ee2895a783
commit 78deaa735d
223 changed files with 860 additions and 424 deletions

View File

@@ -111,4 +111,12 @@ class CerebrasLLMService(OpenAILLMService):
params.update(params_from_context)
params.update(self._settings.extra)
# Prepend system instruction if set
if self._settings.system_instruction:
messages = params.get("messages", [])
params["messages"] = [
{"role": "system", "content": self._settings.system_instruction}
] + messages
return params