AI wizard/test/doctor: native-auth handling, Responses API test, safe temp, stale profile

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QKxGW1raAWaqeU8WdHsMsp
This commit is contained in:
2026-08-24 20:50:11 -04:00
co-authored by Claude Fable 5
parent a942500712
commit 78909cbfd5
3 changed files with 35 additions and 10 deletions
+14 -2
View File
@@ -15,6 +15,11 @@ if [[ -z $profile ]]; then
fi
echo "INFO ai: current profile $profile"
if [[ ! -f $CN_AI_PROFILE_DIR/$profile.toml ]]; then
echo "FAIL ai: 默认 Profile $profile 的文件不存在 (omarchycn ai profile list)"
exit 1
fi
harness=$(cn_ai_profile_field "$profile" harness)
provider=$(cn_ai_profile_field "$profile" provider)
command=$(cn_ai_harness_field "$harness" command)
@@ -23,10 +28,17 @@ proto=$(cn_ai_harness_field "$harness" protocol)
if command -v "$command" > /dev/null 2>&1; then
echo "PASS ai: harness $harness installed ($command)"
else
echo "WARN ai: harness $harness 未安装,首次 launch 时自动安装"
install=$(cn_ai_harness_field "$harness" install)
if [[ $install == doc:* ]]; then
echo "WARN ai: harness $harness 未安装,需手动安装: ${install#doc:}"
else
echo "WARN ai: harness $harness 未安装,首次 launch 时自动安装"
fi
fi
if omarchy-cn-ai-secret get "$provider" > /dev/null 2>&1; then
if [[ $proto == "native" ]]; then
echo "INFO ai: $harness 自管鉴权,跳过 OmarchyCN Key 检查"
elif omarchy-cn-ai-secret get "$provider" > /dev/null 2>&1; then
echo "PASS ai: $provider API Key stored"
else
echo "FAIL ai: $provider API Key 未存储 (omarchycn ai secret set $provider)"