WebUI 전체 기본값 함수 호출 = 레거시 (Windows·Mac)

- 이미지 설정 맞춤(python)에 models.default_params.function_calling = legacy 추가
  (전체 기본값이 비어 있을 때만, 관리자가 정한 값은 그대로)
- 개인 설정이 '기본값'이면 이 값이 적용되어 사용자마다 바꿀 필요 없음

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HnDmXrFqktWwYa1cuJRAVZ
This commit is contained in:
2026-11-05 06:46:18 +00:00
parent bd149da590
commit 6565456566
5 changed files with 21 additions and 3 deletions

View File

@@ -113,6 +113,14 @@ if e.get('IMAGE_EDIT_ENGINE', '').lower() == 'comfyui':
want['images.edit.comfyui.base_url'] = eurl
if not want and e.get('IMAGE_GENERATION_ENGINE', '').lower() != 'comfyui' and e.get('IMAGE_EDIT_ENGINE', '').lower() != 'comfyui':
print('SKIP'); sys.exit(0)
# 3) function calling default for all users: legacy (Image switch -> straight to ComfyUI, works with models without tools)
# only when no global value is set yet (an admin choice like native is kept)
if e.get('IMAGE_GENERATION_ENGINE', '').lower() == 'comfyui':
dp = get('models.default_params')
dp = dict(dp) if isinstance(dp, dict) else {}
if not dp.get('function_calling'):
dp['function_calling'] = 'legacy'
want['models.default_params'] = dp
changed = [k for k, v in want.items() if not same(get(k), v)]
now = int(time.time())
for k in changed: