revert persona feature (caused MCP timeout), keep Command Code backend + developer role fix
This commit is contained in:
@@ -80,7 +80,6 @@ BACKEND = CONFIG["backend_type"]
|
||||
TARGET_URL = CONFIG["target_url"].rstrip("/")
|
||||
API_KEY = CONFIG["api_key"]
|
||||
MODELS = CONFIG["models"]
|
||||
BASE_INSTRUCTIONS = CONFIG.get("base_instructions", "")
|
||||
|
||||
# ═══════════════════════════════════════════════════════════════════
|
||||
# Shared helpers
|
||||
@@ -654,8 +653,6 @@ class Handler(http.server.BaseHTTPRequestHandler):
|
||||
input_data = body.get("input", "")
|
||||
messages = oa_input_to_messages(input_data)
|
||||
instructions = body.get("instructions", "").strip()
|
||||
if not instructions and BASE_INSTRUCTIONS:
|
||||
instructions = BASE_INSTRUCTIONS
|
||||
if instructions:
|
||||
messages.insert(0, {"role": "system", "content": instructions})
|
||||
chat_body = {"model": model, "messages": messages}
|
||||
@@ -689,8 +686,6 @@ class Handler(http.server.BaseHTTPRequestHandler):
|
||||
an_body = {"model": model, "messages": an_input_to_messages(input_data),
|
||||
"max_tokens": body.get("max_output_tokens", 8192)}
|
||||
instructions = body.get("instructions", "").strip()
|
||||
if not instructions and BASE_INSTRUCTIONS:
|
||||
instructions = BASE_INSTRUCTIONS
|
||||
if instructions:
|
||||
an_body["system"] = instructions
|
||||
for k in ("temperature", "top_p"):
|
||||
@@ -725,8 +720,6 @@ class Handler(http.server.BaseHTTPRequestHandler):
|
||||
input_data = body.get("input", "")
|
||||
instructions = body.get("instructions", "").strip()
|
||||
messages = cc_input_to_messages(input_data)
|
||||
if not instructions and BASE_INSTRUCTIONS:
|
||||
instructions = BASE_INSTRUCTIONS
|
||||
if instructions:
|
||||
sys_msg = {"role": "system", "content": instructions}
|
||||
messages.insert(0, sys_msg)
|
||||
|
||||
Reference in New Issue
Block a user