Commit 0afc892
committed
feat: dynamic model discovery from OpenRouter + React Doctor 100/100
Backend: Models are now dynamically fetched from OpenRouter API (filtered by
programming-relevant providers), cached in Redis (1h TTL) + in-memory (30min),
with periodic background refresh. Auto-detects latest Anthropic Sonnet as
default. Falls back to hardcoded list if API is unavailable.
Frontend: Model selector fetches models from /api/models/available endpoint.
Refactored hero-section and message-input to useReducer (React Doctor).
Replaced client-side router.replace() redirect with render-time redirect().1 parent e86a399 commit 0afc892
File tree
14 files changed
+1124
-1149
lines changed- backend
- agent
- inngest_functions
- services
- utils
- frontend
- src
- app/(home)/projects/[projectId]/thread/_components
- components
- home/sections
- thread/chat-input
- hooks/react-query/models
14 files changed
+1124
-1149
lines changedLarge diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
| 127 | + | |
127 | 128 | | |
128 | | - | |
129 | | - | |
130 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
131 | 135 | | |
132 | 136 | | |
133 | 137 | | |
| |||
402 | 406 | | |
403 | 407 | | |
404 | 408 | | |
405 | | - | |
| 409 | + | |
406 | 410 | | |
407 | 411 | | |
408 | 412 | | |
| |||
1138 | 1142 | | |
1139 | 1143 | | |
1140 | 1144 | | |
1141 | | - | |
1142 | | - | |
| 1145 | + | |
| 1146 | + | |
1143 | 1147 | | |
1144 | 1148 | | |
1145 | 1149 | | |
| |||
1179 | 1183 | | |
1180 | 1184 | | |
1181 | 1185 | | |
1182 | | - | |
| 1186 | + | |
1183 | 1187 | | |
1184 | 1188 | | |
1185 | 1189 | | |
| |||
1205 | 1209 | | |
1206 | 1210 | | |
1207 | 1211 | | |
1208 | | - | |
1209 | | - | |
1210 | | - | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
1211 | 1215 | | |
1212 | 1216 | | |
1213 | 1217 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| |||
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
130 | | - | |
| 131 | + | |
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
64 | 73 | | |
65 | 74 | | |
66 | 75 | | |
67 | 76 | | |
68 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
69 | 81 | | |
70 | 82 | | |
71 | | - | |
| 83 | + | |
72 | 84 | | |
| 85 | + | |
73 | 86 | | |
74 | 87 | | |
| 88 | + | |
| 89 | + | |
75 | 90 | | |
76 | 91 | | |
77 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
131 | 141 | | |
132 | 142 | | |
133 | 143 | | |
| |||
0 commit comments