From 9d9ae1fa7646675b9e0b3bd8b3f681aa75727f77 Mon Sep 17 00:00:00 2001 From: supmo668 Date: Sun, 23 Nov 2025 17:13:33 -0800 Subject: [PATCH] fix: Add client attribute type annotation to BaseOpenAIClient MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- graphiti_core/llm_client/openai_base_client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/graphiti_core/llm_client/openai_base_client.py b/graphiti_core/llm_client/openai_base_client.py index 93e9c598..25927270 100644 --- a/graphiti_core/llm_client/openai_base_client.py +++ b/graphiti_core/llm_client/openai_base_client.py @@ -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,