mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-19 22:21:04 +08:00
Fix: display model_id in memory_list (#16567)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user