Spaces:
Running
Running
Commit
·
5a5132a
1
Parent(s):
6d10fd4
add
Browse files
frontend/src/components/shared/modals/MethodSelectionModal.tsx
CHANGED
|
@@ -140,6 +140,11 @@ export function MethodSelectionModal({
|
|
| 140 |
const productionMethods = methods.filter(
|
| 141 |
(m) => m.method_type === "production"
|
| 142 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 143 |
const baselineMethods = methods.filter((m) => m.method_type === "baseline");
|
| 144 |
|
| 145 |
return (
|
|
@@ -163,7 +168,7 @@ export function MethodSelectionModal({
|
|
| 163 |
Production Methods
|
| 164 |
</h3>
|
| 165 |
<div className="space-y-3">
|
| 166 |
-
{
|
| 167 |
const Icon = getMethodIcon(method);
|
| 168 |
const isSelected = selectedMethod === method.id;
|
| 169 |
|
|
|
|
| 140 |
const productionMethods = methods.filter(
|
| 141 |
(m) => m.method_type === "production"
|
| 142 |
);
|
| 143 |
+
// Ensure display order: recommended (openai_structured) first
|
| 144 |
+
const sortedProductionMethods = [...productionMethods].sort((a, b) => {
|
| 145 |
+
if (!!a.recommended === !!b.recommended) return 0;
|
| 146 |
+
return a.recommended ? -1 : 1;
|
| 147 |
+
});
|
| 148 |
const baselineMethods = methods.filter((m) => m.method_type === "baseline");
|
| 149 |
|
| 150 |
return (
|
|
|
|
| 168 |
Production Methods
|
| 169 |
</h3>
|
| 170 |
<div className="space-y-3">
|
| 171 |
+
{sortedProductionMethods.map((method) => {
|
| 172 |
const Icon = getMethodIcon(method);
|
| 173 |
const isSelected = selectedMethod === method.id;
|
| 174 |
|