Commit c9003bc
committed
fix(process_response): use issubclass instead of isinstance for ParallelBase check
The response_model parameter is a class (type), not an instance. Using
isinstance() on a class checks if that class is an instance of a type,
which always returns False for user-defined classes.
Changed from:
if isinstance(response_model, ParallelBase):
To:
if inspect.isclass(response_model) and issubclass(response_model, ParallelBase):
This fixes the "'generator' object has no attribute '_raw_response'" error
when using ParallelTools with models like Qwen3-VL.
Fixes #20491 parent c6f9ef5 commit c9003bc
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
266 | | - | |
| 266 | + | |
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
384 | | - | |
| 384 | + | |
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
| |||
0 commit comments