Lee-W commented on code in PR #76801:
URL: https://github.com/apache/airflow/pull/76801#discussion_r4615673309


##########
providers/common/ai/src/airflow/providers/common/ai/durable/capability.py:
##########
@@ -686,9 +693,12 @@ async def _fingerprint_model_request(
         # here as well as in the request itself is safe.
         model = await self._durability._model_for_fingerprint(model_id, 
run_context)
         prepared_settings, prepared_parameters = 
model.prepare_request(model_settings, parameters)
-        return fingerprint_model_request(
-            f"{model.system}:{model.model_name}", messages, prepared_settings, 
prepared_parameters
-        )
+        # A chain whose members all stamp their answers is fingerprinted by a 
fixed name, not its
+        # members: editing the chain must not invalidate steps a surviving 
member answered.
+        # ``_find_unusable_answerer`` rejects the replay of a step whose 
answering member left
+        # the chain. Any other chain cannot say who answered, so it keeps the 
member-listing name.
+        identity = "fallback" if _is_stamped_chain(model) else 
f"{model.system}:{model.model_name}"

Review Comment:
   The journal stores a response before the agent writes `model_id` on it, so a 
replayed step got the edited chain's id and the next request hashed differently.
   
   For a chain the hook builds, the hashed history now leaves `model_id` out of 
responses; every other model hashes as before.
   
   Added the two-tool case, for `a,b` -> `a,c` and for a member added before 
the one that answered.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to