mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 09:20:22 +08:00
fix: 补充合并后遗漏的 from __future__ import annotations
合并 fix/python314-upgrade 后,部分文件仍使用 Optional/Dict 等旧式类型 但未添加 future annotations 导入,导致运行时 NameError。
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
ProviderEndpoint 相关的 API 模型定义
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import re
|
||||
from datetime import datetime
|
||||
from typing import Any, Literal
|
||||
@@ -171,7 +173,7 @@ class EndpointAPIKeyCreate(BaseModel):
|
||||
default="api_key",
|
||||
description="认证类型:api_key(标准 API Key)或 vertex_ai(Vertex AI Service Account)"
|
||||
)
|
||||
auth_config: Optional[Dict[str, Any]] = Field(
|
||||
auth_config: dict[str, Any] | None = Field(
|
||||
default=None,
|
||||
description="认证配置(JSON):vertex_ai 时存储完整 Service Account JSON"
|
||||
)
|
||||
|
||||
@@ -5,6 +5,8 @@ Google Gemini API 请求/响应模型
|
||||
作为 API 网关,采用宽松类型定义以支持 API 新特性透传
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
Reference in New Issue
Block a user