feat: add Chinese UI, Responses models, and mirrored Windows setup
Localize the web console and persist custom model and capability settings. Use OpenAI Responses exclusively and move runtime limits into environment configuration. Bootstrap uv and the virtual environment on Windows, support optional China mirrors, and package source distributions without environments, build output, or credentials. Update regression tests and repository quality checks for the new behavior.
This commit is contained in:
1 parent
371aa6df56
commit
2ddec53954
183 files changed
+3427
-11857
No files matched your search
@@ -35,6 +35,7 @@ context is rebuilt only when a compression event replaces or folds turns.
|
||||
"""
|
||||
|
||||
import asyncio
|
||||
from artemis.config.settings import settings
|
||||
from dataclasses import dataclass, field
|
||||
import json
|
||||
from pathlib import Path
|
||||
@@ -45,7 +46,6 @@ from uuid import uuid4
|
||||
|
||||
from langchain_core.messages import BaseMessage, HumanMessage, SystemMessage
|
||||
|
||||
from artemis.llm.google import is_google_provider
|
||||
from artemis.memory.step_memory import JobKey, StepLens, StepMemoryService
|
||||
from artemis.memory.transcript import format_session_offset
|
||||
from artemis.utils.logger import get_logger
|
||||
@@ -298,7 +298,7 @@ class StepCapsuleLens(StepLens):
|
||||
fallback_model_name: str | None = None,
|
||||
fallback_llm: Any | None = None,
|
||||
):
|
||||
self._model_name = model_name or "gemini-3.8-flash"
|
||||
self._model_name = model_name or settings.OPENAI_MODEL
|
||||
self._llm = llm
|
||||
self._ctx = ctx
|
||||
# Availability hardening: `chunking.model` is a dedicated model with no
|
||||
@@ -323,16 +323,16 @@ class StepCapsuleLens(StepLens):
|
||||
|
||||
def _get_llm(self):
|
||||
if self._llm is None:
|
||||
from artemis.services.llm import get_google_llm
|
||||
from artemis.services.llm import get_openai_llm
|
||||
|
||||
self._llm = get_google_llm(model_name=self._model_name, temperature=0.0)
|
||||
self._llm = get_openai_llm(model_name=self._model_name, temperature=0.0)
|
||||
return self._llm
|
||||
|
||||
def _get_fallback_llm(self):
|
||||
if self._fallback_llm is None and self._fallback_model_name:
|
||||
from artemis.services.llm import get_google_llm
|
||||
from artemis.services.llm import get_openai_llm
|
||||
|
||||
self._fallback_llm = get_google_llm(
|
||||
self._fallback_llm = get_openai_llm(
|
||||
model_name=self._fallback_model_name, temperature=0.0
|
||||
)
|
||||
return self._fallback_llm
|
||||
@@ -891,7 +891,7 @@ class HistoryChunkManager:
|
||||
self._max_steps = int(getattr(cc, "max_steps", 12) or 12)
|
||||
self._min_steps = max(1, min(self._max_steps, int(getattr(cc, "min_steps", 3) or 3)))
|
||||
self._target_source_tokens = int(getattr(cc, "target_source_tokens", 2000) or 2000)
|
||||
self._model_name = getattr(cc, "model", None) or "gemini-3.8-flash"
|
||||
self._model_name = getattr(cc, "model", None) or settings.OPENAI_MODEL
|
||||
self._max_chunks = int(getattr(cc, "max_chunks", 8) or 8)
|
||||
# None uses max_chunks as the era cap.
|
||||
self._max_eras = int(getattr(cc, "max_eras", None) or self._max_chunks)
|
||||
@@ -965,7 +965,7 @@ class HistoryChunkManager:
|
||||
fallback = getattr(getattr(llm_cfg, "summarizer", None), "fallback", None)
|
||||
provider = str(getattr(fallback, "provider", "") or "")
|
||||
model = getattr(fallback, "model", None)
|
||||
if model and is_google_provider(provider) and model != self._model_name:
|
||||
if model and str(provider).lower() == "openai" and model != self._model_name:
|
||||
return str(model)
|
||||
except Exception as exc:
|
||||
logger.debug(f"Capsule fallback model resolution skipped: {exc}", exc_info=True)
|
||||
|
||||
Reference in new issue
Block a user