Commit 53874c7
authored
- Remove extra fields (root, parent, permission) from /v1/models response
- Create separate ListModel struct for models endpoint that matches OpenAI spec exactly
- Update created timestamp to use proper system time instead of 0
- Update all tests to use the new ListModel structure
Root cause: Frontend applications like Open WebUI and AnythingLLM expect strict OpenAI API compliance. The extra fields in shimmy's Model struct were causing them to reject the API as incompatible.
Fix ensures /v1/models returns only: id, object, created, owned_by - matching OpenAI specification exactly.
1 parent af49c7a commit 53874c7
3 files changed
Lines changed: 34 additions & 40 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
90 | 98 | | |
91 | 99 | | |
92 | 100 | | |
| |||
108 | 116 | | |
109 | 117 | | |
110 | 118 | | |
111 | | - | |
112 | | - | |
| 119 | + | |
| 120 | + | |
113 | 121 | | |
114 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
115 | 126 | | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | 127 | | |
120 | 128 | | |
121 | 129 | | |
| |||
714 | 722 | | |
715 | 723 | | |
716 | 724 | | |
717 | | - | |
| 725 | + | |
718 | 726 | | |
719 | 727 | | |
720 | 728 | | |
721 | 729 | | |
722 | | - | |
723 | | - | |
724 | | - | |
725 | 730 | | |
726 | | - | |
| 731 | + | |
727 | 732 | | |
728 | 733 | | |
729 | 734 | | |
730 | 735 | | |
731 | | - | |
732 | | - | |
733 | | - | |
734 | 736 | | |
735 | 737 | | |
736 | 738 | | |
| |||
1040 | 1042 | | |
1041 | 1043 | | |
1042 | 1044 | | |
1043 | | - | |
| 1045 | + | |
1044 | 1046 | | |
1045 | 1047 | | |
1046 | | - | |
| 1048 | + | |
1047 | 1049 | | |
1048 | | - | |
1049 | | - | |
1050 | | - | |
1051 | 1050 | | |
1052 | | - | |
| 1051 | + | |
1053 | 1052 | | |
1054 | 1053 | | |
1055 | | - | |
| 1054 | + | |
1056 | 1055 | | |
1057 | | - | |
1058 | | - | |
1059 | | - | |
1060 | 1056 | | |
1061 | 1057 | | |
1062 | 1058 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | 72 | | |
76 | 73 | | |
77 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
| 204 | + | |
205 | 205 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | 206 | | |
210 | | - | |
| 207 | + | |
211 | 208 | | |
212 | 209 | | |
213 | | - | |
| 210 | + | |
214 | 211 | | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | 212 | | |
219 | 213 | | |
220 | 214 | | |
| |||
345 | 339 | | |
346 | 340 | | |
347 | 341 | | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
348 | 349 | | |
349 | 350 | | |
350 | | - | |
| 351 | + | |
351 | 352 | | |
352 | 353 | | |
353 | 354 | | |
| |||
0 commit comments