fix: compare bound method by equality, not identity
Bound methods are created fresh on each attribute access, so 'self._missing_function_call_handler is self._missing_function_call_handler' is always False. Using 'is' meant the placeholder branch never fired and both warnings logged when a function was missing at queue time. Switch to == so equality compares the underlying function and instance. Strengthen the missing-at-queue-time test to assert the second warning does not fire.
This commit is contained in:
@@ -792,7 +792,7 @@ class LLMService(UserTurnCompletionLLMServiceMixin, AIService):
|
||||
item = self._functions[runner_item.function_name]
|
||||
elif None in self._functions.keys():
|
||||
item = self._functions[None]
|
||||
elif runner_item.registry_item.handler is self._missing_function_call_handler:
|
||||
elif runner_item.registry_item.handler == self._missing_function_call_handler:
|
||||
item = runner_item.registry_item
|
||||
else:
|
||||
logger.warning(
|
||||
|
||||
Reference in New Issue
Block a user