fix(provider): add missing ClassVar import in gemini_source

ClassVar was used but not imported, causing all Gemini provider
adapters to fail loading with NameError.
This commit is contained in:
LIghtJUNction
2026-04-11 20:43:23 +08:00
parent 7543dd2e9d
commit 3fc29a6327

View File

@@ -6,7 +6,7 @@ import random
import uuid
from collections.abc import AsyncGenerator
from pathlib import Path
from typing import Literal
from typing import ClassVar, Literal
from urllib.parse import urlparse
import aiofiles
@@ -22,11 +22,11 @@ from astrbot.core.exceptions import EmptyModelOutputError
from astrbot.core.message.message_event_result import MessageChain
from astrbot.core.provider.entities import LLMResponse, TokenUsage
from astrbot.core.provider.func_tool_manager import ToolSet
from astrbot.core.provider.register import register_provider_adapter
from astrbot.core.utils.astrbot_path import get_astrbot_temp_path
from astrbot.core.utils.io import download_file, download_image_by_url
from astrbot.core.utils.media_utils import ensure_wav
from astrbot.core.utils.network_utils import is_connection_error, log_connection_failure
from astrbot.core.provider.register import register_provider_adapter
class SuppressNonTextPartsWarning(logging.Filter):