Add GPT-5.5 to the curated lists and show curated providers as a dropdown

This commit is contained in:
ZacharyZhang-NY committed 2026-05-30 01:42:07 -04:00
1 parent 2dbab2c1fe
commit 1b0d766c0c
2 files changed
+16 -3

No files matched your search

@@ -1,4 +1,4 @@
import { Fragment, useMemo, useState, type FormEvent } from "react";
import { Fragment, useEffect, useMemo, useState, type FormEvent } from "react";
import {
PROVIDER_AUTH_TYPE,
type AppSnapshot,
@@ -328,6 +328,15 @@ function ProviderCredentialFields({
void loadModels(secret);
};
// Curated providers (no live endpoint) show their fixed dropdown once a
// credential is present; seed the selection with the provider default.
const showCuratedList = !live && hasCredential && selected.models.length > 0;
useEffect(() => {
if (showCuratedList && !draft.providerModel) {
onChange({ providerModel: selected.defaultModel ?? selected.models[0].id });
}
}, [showCuratedList, draft.providerModel, selected, onChange]);
return (
<div className="provider-inline-form">
{selected.credentialHelp && (
@@ -383,13 +392,13 @@ function ProviderCredentialFields({
{loadError && <div style={{ color: "var(--red)", fontSize: 12 }}>{loadError}</div>}
{hasCredential && (
<Field label="Model">
{fetched ? (
{fetched || showCuratedList ? (
<select
className="input"
value={draft.providerModel}
onChange={(event) => onChange({ providerModel: event.target.value })}
>
{fetched.map((model) => (
{(fetched ?? selected.models).map((model) => (
<option key={model.id} value={model.id}>{model.name}</option>
))}
</select>
@@ -25,6 +25,7 @@ const ANTHROPIC_MODELS: ProviderModelEntry[] = [
export const PROVIDER_MODELS: Record<string, ProviderModelEntry[]> = {
openai: [
{ id: "gpt-5.5", name: "GPT-5.5" },
{ id: "gpt-5.4-pro", name: "GPT-5.4 Pro" },
{ id: "gpt-5.4", name: "GPT-5.4" },
{ id: "gpt-5.4-mini", name: "GPT-5.4 mini" },
@@ -109,6 +110,7 @@ export const PROVIDER_MODELS: Record<string, ProviderModelEntry[]> = {
{ id: "claude-sonnet-4.5", name: "Claude Sonnet 4.5" },
{ id: "claude-sonnet-4", name: "Claude Sonnet 4" },
{ id: "claude-haiku-4.5", name: "Claude Haiku 4.5" },
{ id: "gpt-5.5", name: "GPT-5.5" },
{ id: "gpt-5.4", name: "GPT-5.4" },
{ id: "gpt-5.4-mini", name: "GPT-5.4 mini" },
{ id: "gpt-5.3-codex", name: "GPT-5.3 Codex" },
@@ -140,6 +142,7 @@ export const PROVIDER_MODELS: Record<string, ProviderModelEntry[]> = {
{ id: "gpt-oss-120b-medium", name: "GPT-OSS 120B Medium" },
],
"gpt-account": [
{ id: "gpt-5.5", name: "GPT-5.5" },
{ id: "gpt-5.4", name: "GPT-5.4" },
{ id: "gpt-5.4-mini", name: "GPT-5.4 Mini" },
{ id: "gpt-5.3-codex", name: "GPT-5.3 Codex" },
@@ -151,6 +154,7 @@ export const PROVIDER_MODELS: Record<string, ProviderModelEntry[]> = {
{ id: "gpt-5.1-codex-mini", name: "GPT-5.1 Codex Mini" },
],
"azure-openai": [
{ id: "gpt-5.5", name: "GPT-5.5" },
{ id: "gpt-5.4", name: "GPT-5.4" },
{ id: "gpt-5.4-mini", name: "GPT-5.4 mini" },
{ id: "gpt-5.3-codex", name: "GPT-5.3 Codex" },