auto-save 2026-05-13 21:02 (~2)

This commit is contained in:
2026-05-13 21:02:26 +08:00
parent 5bb24487d3
commit 21c5a2bc2e
2 changed files with 35 additions and 5 deletions

View File

@@ -2368,6 +2368,19 @@
"message": "auto-save 2026-05-13 20:51 (~7)", "message": "auto-save 2026-05-13 20:51 (~7)",
"hash": "a8d0901", "hash": "a8d0901",
"files_changed": 7 "files_changed": 7
},
{
"ts": "2026-05-13T20:56:56+08:00",
"type": "commit",
"message": "auto-save 2026-05-13 20:56 (~7)",
"hash": "5bb2448",
"files_changed": 7
},
{
"ts": "2026-05-13T12:59:30Z",
"type": "session-heartbeat",
"message": "Codex 会话活跃 · 最近命令codex · 1 项未提交变更 · 最近提交auto-save 2026-05-13 20:56 (~7)",
"files_changed": 1
} }
] ]
} }

View File

@@ -1,6 +1,7 @@
from __future__ import annotations from __future__ import annotations
import asyncio import asyncio
import base64
import json import json
import os import os
import shutil import shutil
@@ -31,12 +32,28 @@ REWRITE_MODEL = os.getenv("REWRITE_MODEL", "gemini-2.5-pro")
VISION_MODEL = os.getenv("VISION_MODEL", "gemini-2.5-flash") VISION_MODEL = os.getenv("VISION_MODEL", "gemini-2.5-flash")
IMAGE_MODEL = os.getenv("IMAGE_MODEL", "gemini-3-pro-image-preview") IMAGE_MODEL = os.getenv("IMAGE_MODEL", "gemini-3-pro-image-preview")
VIDEO_MODEL = os.getenv("VIDEO_MODEL", "seedance").strip() or "seedance" VIDEO_MODEL = os.getenv("VIDEO_MODEL", "seedance").strip() or "seedance"
POE_API_BASE_URL = os.getenv("POE_API_BASE_URL", "https://api.poe.com/v1").strip() or "https://api.poe.com/v1"
POE_API_KEY = os.getenv("POE_API_KEY", "").strip()
def env_video_model(name: str, default: str) -> str:
value = os.getenv(name, "").strip()
if not value:
return default
# Older local envs used business aliases as model IDs. Keep those aliases usable
# while mapping them to concrete Poe video model IDs by default.
if value.lower() in {"seedance", "kling", "veo", "veo3", "voe"}:
return default
return value
VIDEO_MODEL_ALIASES = { VIDEO_MODEL_ALIASES = {
"seedance": os.getenv("VIDEO_MODEL_SEEDANCE", "seedance").strip() or "seedance", "seedance": env_video_model("VIDEO_MODEL_SEEDANCE", "seedance-2-fast"),
"kling": os.getenv("VIDEO_MODEL_KLING", "kling").strip() or "kling", "kling": env_video_model("VIDEO_MODEL_KLING", "kling-omni"),
"veo3": os.getenv("VIDEO_MODEL_VEO3", "veo3").strip() or "veo3", "veo3": env_video_model("VIDEO_MODEL_VEO3", "veo-3.1-fast"),
"veo": os.getenv("VIDEO_MODEL_VEO3", "veo3").strip() or "veo3", "veo": env_video_model("VIDEO_MODEL_VEO3", "veo-3.1-fast"),
"voe": os.getenv("VIDEO_MODEL_VEO3", "veo3").strip() or "veo3", "voe": env_video_model("VIDEO_MODEL_VEO3", "veo-3.1-fast"),
} }
VIDEO_API_BASE_URL = os.getenv("VIDEO_API_BASE_URL", "").strip() VIDEO_API_BASE_URL = os.getenv("VIDEO_API_BASE_URL", "").strip()
VIDEO_API_KEY = os.getenv("VIDEO_API_KEY", "").strip() VIDEO_API_KEY = os.getenv("VIDEO_API_KEY", "").strip()