kaxil commented on code in PR #74380:
URL: https://github.com/apache/airflow/pull/74380#discussion_r4206779514


##########
providers/common/ai/src/airflow/providers/common/ai/toolsets/hook.py:
##########
@@ -181,6 +181,12 @@ async def get_tools(self, ctx: RunContext[Any]) -> 
dict[str, ToolsetTool[Any]]:
                 if param_name in json_schema.get("properties", {}):
                     json_schema["properties"][param_name]["description"] = 
param_desc
             _drop_properties(json_schema, self._pinned)
+            # The validator accepts the pinned names, with any value, so a 
model that sends one
+            # anyway is told it is fixed rather than given a generic 
extra-input or type error.
+            args_schema = {
+                **json_schema,
+                "properties": {**json_schema["properties"], 
**dict.fromkeys(self._pinned, {})},

Review Comment:
   Done, switched to `json_schema["properties"] | {name: {} for name in 
self._pinned}` so each pinned name gets its own fragment.



-- 
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