Commit 89bed43
fix: Add finish reason mapping and remove custom file URI handling in LiteLLM
Introduces a function to map LiteLLM finish reason strings to the internal types.FinishReason enum and populates the finish_reason field in LlmResponse. Removes custom logic for handling file URIs, including special casing for different providers, and updates tests accordingly
Close #4125
Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 8564213171 parent 8264211 commit 89bed43
File tree
2 files changed
+69
-0
lines changed- src/google/adk/models
- tests/unittests/models
2 files changed
+69
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
113 | 125 | | |
114 | 126 | | |
115 | 127 | | |
| |||
1840 | 1852 | | |
1841 | 1853 | | |
1842 | 1854 | | |
| 1855 | + | |
| 1856 | + | |
| 1857 | + | |
1843 | 1858 | | |
1844 | 1859 | | |
1845 | 1860 | | |
| |||
1854 | 1869 | | |
1855 | 1870 | | |
1856 | 1871 | | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
1857 | 1875 | | |
1858 | 1876 | | |
1859 | 1877 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2880 | 2880 | | |
2881 | 2881 | | |
2882 | 2882 | | |
| 2883 | + | |
2883 | 2884 | | |
2884 | 2885 | | |
2885 | 2886 | | |
| |||
2900 | 2901 | | |
2901 | 2902 | | |
2902 | 2903 | | |
| 2904 | + | |
| 2905 | + | |
| 2906 | + | |
| 2907 | + | |
| 2908 | + | |
| 2909 | + | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
| 2916 | + | |
| 2917 | + | |
| 2918 | + | |
| 2919 | + | |
| 2920 | + | |
| 2921 | + | |
| 2922 | + | |
| 2923 | + | |
| 2924 | + | |
| 2925 | + | |
| 2926 | + | |
| 2927 | + | |
| 2928 | + | |
| 2929 | + | |
| 2930 | + | |
| 2931 | + | |
| 2932 | + | |
| 2933 | + | |
| 2934 | + | |
| 2935 | + | |
| 2936 | + | |
| 2937 | + | |
| 2938 | + | |
| 2939 | + | |
| 2940 | + | |
| 2941 | + | |
| 2942 | + | |
| 2943 | + | |
| 2944 | + | |
| 2945 | + | |
| 2946 | + | |
| 2947 | + | |
| 2948 | + | |
| 2949 | + | |
| 2950 | + | |
| 2951 | + | |
| 2952 | + | |
2903 | 2953 | | |
2904 | 2954 | | |
2905 | 2955 | | |
| |||
2944 | 2994 | | |
2945 | 2995 | | |
2946 | 2996 | | |
| 2997 | + | |
2947 | 2998 | | |
2948 | 2999 | | |
2949 | 3000 | | |
| |||
0 commit comments