mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-03 01:40:21 +08:00
feat(codex-image): 封装 GPT Image 2 图片接口并收紧错误处理
- 新增 openai:image 路由、planner 与 finalize,内部通过 Codex responses image_generation tool 执行生图 - 补充 Codex OAuth/header 兼容、图片 success report 本地处理与相关前后端/集成测试 - 禁止 chat/completions 使用 gpt-image-2,图片接口限制 n=1,并移除 Provider 模型页的图片能力开关
This commit is contained in:
@@ -37,6 +37,7 @@ pub fn build_admin_provider_model_create_record(
|
||||
supports_function_calling: Option<bool>,
|
||||
supports_streaming: Option<bool>,
|
||||
supports_extended_thinking: Option<bool>,
|
||||
supports_image_generation: Option<bool>,
|
||||
is_active: Option<bool>,
|
||||
config: Option<serde_json::Value>,
|
||||
) -> Result<UpsertAdminProviderModelRecord, String> {
|
||||
@@ -52,7 +53,7 @@ pub fn build_admin_provider_model_create_record(
|
||||
supports_function_calling,
|
||||
supports_streaming,
|
||||
supports_extended_thinking,
|
||||
None,
|
||||
supports_image_generation,
|
||||
is_active.unwrap_or(true),
|
||||
true,
|
||||
config,
|
||||
@@ -72,6 +73,7 @@ pub fn build_admin_provider_model_update_record(
|
||||
supports_function_calling: Option<bool>,
|
||||
supports_streaming: Option<bool>,
|
||||
supports_extended_thinking: Option<bool>,
|
||||
supports_image_generation: Option<bool>,
|
||||
is_active: bool,
|
||||
is_available: bool,
|
||||
config: Option<serde_json::Value>,
|
||||
@@ -88,7 +90,7 @@ pub fn build_admin_provider_model_update_record(
|
||||
supports_function_calling,
|
||||
supports_streaming,
|
||||
supports_extended_thinking,
|
||||
existing.supports_image_generation,
|
||||
supports_image_generation,
|
||||
is_active,
|
||||
is_available,
|
||||
config,
|
||||
|
||||
Reference in New Issue
Block a user