feat: implement automatic payload candidate retry mechanism in AIPlanner for improved LM Studio compatibility

This commit is contained in:
21in7
2026-03-27 20:07:32 +09:00
parent 2cf072d38c
commit d054f9aee1
4 changed files with 94 additions and 12 deletions

View File

@@ -16,6 +16,23 @@
---
## 2026-03-27 LM Studio `unrecognized_keys` 400 추가 수정 계획
### 문제 요약
- `input`을 추가한 뒤에도 LM Studio 서버가 `messages`, `format`, `think`, `options` 키를 거부하며 400을 반환.
- 즉, 서버 모드에 따라 허용 스키마가 다르며 단일 payload로는 호환이 불안정.
### 구현 계획
1. `ai_planner.py`에서 payload를 단일 형태로 고정하지 않고, `legacy chat``input-only` 후보를 순차 시도한다.
2. 400 응답일 때 에러 메시지를 파싱해 다음 후보 payload로 자동 재시도한다.
3. README 설명을 “messages+input 동시 전송”에서 “서버 스키마 자동 호환 재시도”로 정정한다.
### 검증 계획
- `python -m py_compile ai_planner.py`
- LM Studio 로그에서 `unrecognized_keys`가 사라지고 정상 응답으로 전환되는지 확인
---
## 채굴 시 mining_state 반복 설정 제거 (우클릭 유지)
### 문제