fix: filter GPT-5.2 Pro from chat (Responses API only, not chat)
GPT-5.2 Pro and its dated variant only support the Responses API, not Chat Completions. OCI GenAI uses chat/completions internally, causing a 400 error. Also trim debug log to a shorter format.
This commit is contained in:
@@ -919,6 +919,7 @@ def _call_genai(gc: dict, message: str, history: list = None) -> str:
|
||||
region = gc.get("genai_region", "")
|
||||
ocids = model_info.get("ocids", {})
|
||||
model_ref = ocids.get(region) or gc["model_id"]
|
||||
log.info(f"GenAI call: model_id={gc.get('model_id')}, model_ref={model_ref[:60]}...")
|
||||
if gc.get("serving_type") == "DEDICATED" and gc.get("dedicated_endpoint_id"):
|
||||
chat_detail.serving_mode = oci.generative_ai_inference.models.DedicatedServingMode(
|
||||
endpoint_id=gc["dedicated_endpoint_id"]
|
||||
|
||||
Reference in New Issue
Block a user