Repository navigation
Commit bb8547c
fix: remove from __future__ import annotations to fix Gemini AFC
The google-genai SDK's convert_argument_from_function uses raw
param.annotation from inspect.signature() — which are strings under
PEP 563 deferred annotations — then passes them to isinstance(),
causing "isinstance() arg 2 must be a type" errors on every
autonomous tool call. This silently broke all Gemini tool functions
(list_directory, read_file, search_project) and was caught/reported
as generic errors by the AFC loop.
Removing the import is safe since we require Python >=3.12 where all
annotation syntax (str | None, list[str], etc.) works natively.
Also enables exposing gemini_search and semantic_search as autonomous
Gemini tools — Gemini can now search the web and do vector search
during codebase exploration.
Co-Authored-By: Claude Opus 4.6 <[email protected]>1 parent 84d8a98 commit bb8547c
1 file changed
Lines changed: 11 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | 8 | | |
11 | 9 | | |
12 | 10 | | |
| |||
166 | 164 | | |
167 | 165 | | |
168 | 166 | | |
169 | | - | |
170 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
171 | 173 | | |
172 | 174 | | |
173 | 175 | | |
| |||
693 | 695 | | |
694 | 696 | | |
695 | 697 | | |
696 | | - | |
| 698 | + | |
697 | 699 | | |
698 | 700 | | |
699 | 701 | | |
| |||
845 | 847 | | |
846 | 848 | | |
847 | 849 | | |
848 | | - | |
849 | 850 | | |
850 | 851 | | |
851 | 852 | | |
| |||
859 | 860 | | |
860 | 861 | | |
861 | 862 | | |
| 863 | + | |
| 864 | + | |
862 | 865 | | |
863 | 866 | | |
864 | 867 | | |
| |||
994 | 997 | | |
995 | 998 | | |
996 | 999 | | |
997 | | - | |
998 | 1000 | | |
999 | 1001 | | |
1000 | 1002 | | |
| |||
1009 | 1011 | | |
1010 | 1012 | | |
1011 | 1013 | | |
| 1014 | + | |
| 1015 | + | |
1012 | 1016 | | |
1013 | 1017 | | |
1014 | 1018 | | |
| |||
0 commit comments