fix: preserve native model switches and bound project searches
This commit is contained in:
1 parent
db5e876f40
commit
e7d3080e0a
14 files changed
+371
-35
No files matched your search
@@ -34,7 +34,7 @@ import urllib.request
|
||||
import gecis_context
|
||||
|
||||
HERE = os.path.dirname(os.path.abspath(__file__))
|
||||
SURUM = "16" # AITURK IDE'nin bekledigi kopru surumu (codex-link-config.ts CODEX_BRIDGE_VERSION)
|
||||
SURUM = "17" # AITURK IDE'nin bekledigi kopru surumu (codex-link-config.ts CODEX_BRIDGE_VERSION)
|
||||
try:
|
||||
with open(os.path.abspath(__file__), "rb") as _f:
|
||||
KOD = hashlib.sha256(_f.read()).hexdigest()[:8]
|
||||
@@ -484,15 +484,21 @@ class H(http.server.BaseHTTPRequestHandler):
|
||||
source = TRANSFERS.get(scope) if thread else None
|
||||
# A completed return to the subscription ends migration. Historical
|
||||
# foreign IDs must not keep later native turns in the preparer.
|
||||
mixed = ek_model_mu(source or "") or (source is None and gecis_context.foreign(req))
|
||||
if external or mixed:
|
||||
mixed = ek_model_mu(source or "") or (source is None and gecis_context.foreign_history(req))
|
||||
# Format repair is stateless: the saved transcript can still contain
|
||||
# foreign wrappers after a successful native return (or a restart).
|
||||
if external or mixed or gecis_context.foreign(req):
|
||||
try:
|
||||
normalized = gecis_context.normalize(req)
|
||||
except gecis_context.TransferError as e:
|
||||
self._transfer_begin()
|
||||
return self._transfer_fail(str(e))
|
||||
# Small returning requests need no summarizer or local worker.
|
||||
if external or gecis_context.tokens(normalized) > int(32768 * 0.70):
|
||||
# Native opaque state must remain on its owner route. Its byte
|
||||
# size is not a semantic token budget and cannot trigger a
|
||||
# foreign summarizer, including when transfer state is cold.
|
||||
if external or (mixed and not gecis_context.native_opaque(normalized)
|
||||
and gecis_context.tokens(normalized) > int(32768 * 0.70)):
|
||||
prepared, started = self._prepare(normalized, source)
|
||||
if prepared is None:
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user