fix(opencode): reasoning-fallback в вердикте + API-логи в debug-уровень
- verdict(): если в завершённом assistant-сообщении нет text-парта, но есть reasoning — вердикт собирается из reasoning (fallback), а не падает с 'нет text-части в ответе'. Решает сбой dev/reviewer/postmortem на моделях, отвечающих только thinking (например, через прокси tokentool). - Отладочные логи API-вызовов (запрос/ответ) помечены маркером 'debug', чтобы в панели «Логи» они классифицировались как debug, а не info.
This commit is contained in:
@@ -85,6 +85,8 @@ func TestClassifyLevel(t *testing.T) {
|
||||
{"app: db opened /tmp/r.db", LevelInfo},
|
||||
{"app: worker started", LevelInfo},
|
||||
{"opencode: debug: poll request", LevelDebug},
|
||||
{"opencode api debug: prompt -> POST http://127.0.0.1:4096/api/session", LevelDebug},
|
||||
{"opencode api debug: messages response (512 bytes)", LevelDebug},
|
||||
{"trace: session resumed", LevelDebug},
|
||||
{"tg: warn: long poll timeout", LevelWarning},
|
||||
{"ПРЕДУПРЕЖДЕНИЕ: конфиг не задан", LevelWarning},
|
||||
@@ -119,4 +121,4 @@ func TestLogWriterClassifiesLevels(t *testing.T) {
|
||||
if second.Level != LevelError || second.Text != "ERROR: boom" {
|
||||
t.Fatalf("unexpected second: %+v", second)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user