fix: Add client attribute type annotation to BaseOpenAIClient

Fixes pyright type checking error by declaring the client attribute
in the base class. All concrete implementations (OpenAIClient,
AzureOpenAILLMClient, OpenAIGenericClient) initialize this attribute,
and it needs to be accessible for type checking in OpenAIRerankerClient.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
supmo668 2025-11-23 17:13:33 -08:00
parent 6cb2f44849
commit 9d9ae1fa76

View file

@ -21,6 +21,7 @@ from abc import abstractmethod
from typing import Any, ClassVar
import openai
from openai import AsyncAzureOpenAI, AsyncOpenAI
from openai.types.chat import ChatCompletionMessageParam
from pydantic import BaseModel
@ -48,6 +49,9 @@ class BaseOpenAIClient(LLMClient):
# Class-level constants
MAX_RETRIES: ClassVar[int] = 2
# Instance attribute (initialized in subclasses)
client: AsyncOpenAI | AsyncAzureOpenAI
def __init__(
self,
config: LLMConfig | None = None,