mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-28 11:48:10 +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
|
||||
|
||||
Reference in New Issue
Block a user