Add tested 256K Ultra profile

This commit is contained in:
Mikei386
2026-08-22 10:44:14 +02:00
parent a194a2941d
commit f52cf14069
12 changed files with 111 additions and 13 deletions
+6 -5
View File
@@ -2,7 +2,7 @@
"""AI Profile Router – OpenAI-kompatibler Proxy vor llama.cpp.
Leitet OpenAI-kompatible Requests transparent an den lokalen llama.cpp-Server
weiter (Streaming, Tool Calls, JSON) und schaltet zwischen drei festen
weiter (Streaming, Tool Calls, JSON) und schaltet zwischen vier festen
Profilen um:
Profil Kontext
@@ -10,9 +10,10 @@ Profilen um:
fast 76800
medium 94208
long 131072
ultra 262144
Virtuelle Modelle: qwen-fast, qwen-medium, qwen-long
Kommandos: POST /fast, /medium, /long (Profilwechsel)
Virtuelle Modelle: qwen-fast, qwen-medium, qwen-long, qwen-ultra
Kommandos: POST /fast, /medium, /long, /ultra (Profilwechsel)
GET /status (Zustand)
Bildgenerierung (FLUX.2 [klein] 4B Base):
@@ -1109,11 +1110,11 @@ class Handler(BaseHTTPRequestHandler):
self._images_list()
elif path.startswith("/images/") and self.command == "GET":
self._image_serve(path[len("/images/"):])
elif (path in ("/fast", "/medium", "/long")
elif (path in ("/fast", "/medium", "/long", "/ultra")
and (self.command == "POST"
or (self.command == "GET" and ALLOW_LEGACY_GET_SWITCH))):
self._switch(path[1:])
elif (path in ("/fast", "/medium", "/long")
elif (path in ("/fast", "/medium", "/long", "/ultra")
and self.command == "GET"):
self._send_error(405, "Profilwechsel erfordert POST",
"invalid_request_error", "method_not_allowed")
+4
View File
@@ -11,6 +11,10 @@
"long": {
"context": 131072,
"model_alias": "qwen-long"
},
"ultra": {
"context": 262144,
"model_alias": "qwen-ultra"
}
}
}
+1
View File
@@ -36,6 +36,7 @@ def load_profile_registry(path: str | None) -> dict[str, dict]:
"fast": {"context": 76800, "model_alias": None},
"medium": {"context": 94208, "model_alias": None},
"long": {"context": 131072, "model_alias": None},
"ultra": {"context": 262144, "model_alias": None},
}
if not path:
return fallback