Fix: display model_id in memory_list (#16567)

This commit is contained in:
Lynn
2026-07-02 20:28:27 +08:00
committed by GitHub
parent 9a6d30bfe6
commit bc54903bf6
5 changed files with 19 additions and 37 deletions

View File

@@ -313,25 +313,6 @@ async def create_provider_instance(tenant_id: str, provider_id_or_name: str, ins
if not success:
return False, msg
# For SoMark, embed OCR config from model_info into the api_key JSON so
# SoMarkOcrModel.__init__ can read it via the existing key → api_key_payload
# path. This avoids changing the deprecated LLMBundle in tenant_llm_service.py.
if provider_name == "SoMark" and model_info:
cfg = {}
if api_key_str:
try:
cfg = json.loads(api_key_str)
except Exception:
pass
if not isinstance(cfg, dict):
cfg = {}
for model in model_info:
if model.get("extra"):
cfg.update(model["extra"])
if base_url:
cfg["SOMARK_BASE_URL"] = base_url
api_key_str = json.dumps(cfg)
success, msg = await verify_api_key(provider_name, api_key, base_url, region, model_info)
if not success:
return False, msg

View File

@@ -279,7 +279,7 @@ def get_model_config_from_provider_instance(tenant_id, model_type: str | enum.En
if provider_name.lower() == "somark":
# SoMark/OCR factories read parser config (somark_*, parse_method, ...)
# from model_config["extra"]; see tenant_llm_service.LLMBundle OCR path.
model_config["extra"] = model_extra.get("ocr_config", model_extra)
model_config["extra"] = model_extra
if api_key_payload is not None:
model_config["api_key_payload"] = api_key_payload

View File

@@ -84,6 +84,8 @@ class MemoryService(CommonService):
User.nickname.alias("owner_name"),
cls.model.memory_type,
cls.model.storage_type,
cls.model.embd_id,
cls.model.llm_id,
cls.model.permissions,
cls.model.description,
cls.model.create_time,