@@ -1004,6 +1004,50 @@ export default function ProviderDetailPage() {
10041004 const providerStorageAlias = isCompatible ? providerId : providerAlias ;
10051005 const providerDisplayAlias = isCompatible ? providerNode ?. prefix || providerId : providerAlias ;
10061006
1007+ const getApiLabel = ( ) => {
1008+ if ( isAnthropicProtocolCompatible ) return t ( "messagesApi" ) ;
1009+ const type = providerNode ?. apiType ;
1010+ switch ( type ) {
1011+ case "responses" :
1012+ return t ( "responsesApi" ) ;
1013+ case "embeddings" :
1014+ return t ( "embeddings" ) ;
1015+ case "audio-transcriptions" :
1016+ return t ( "audioTranscriptions" ) ;
1017+ case "audio-speech" :
1018+ return t ( "audioSpeech" ) ;
1019+ case "images-generations" :
1020+ return t ( "imagesGenerations" ) ;
1021+ default :
1022+ return t ( "chatCompletions" ) ;
1023+ }
1024+ } ;
1025+
1026+ const getApiDefaultPath = ( ) => {
1027+ if ( isCcCompatible ) return CC_COMPATIBLE_DEFAULT_CHAT_PATH ;
1028+ if ( isAnthropicCompatible ) return "/messages" ;
1029+ const type = providerNode ?. apiType ;
1030+ switch ( type ) {
1031+ case "responses" :
1032+ return "/responses" ;
1033+ case "embeddings" :
1034+ return "/embeddings" ;
1035+ case "audio-transcriptions" :
1036+ return "/audio/transcriptions" ;
1037+ case "audio-speech" :
1038+ return "/audio/speech" ;
1039+ case "images-generations" :
1040+ return "/images/generations" ;
1041+ default :
1042+ return "/chat/completions" ;
1043+ }
1044+ } ;
1045+
1046+ const getApiPath = ( ) => {
1047+ const defaultPath = getApiDefaultPath ( ) ;
1048+ return ( providerNode ?. chatPath || defaultPath ) . replace ( / ^ \/ / , "" ) ;
1049+ } ;
1050+
10071051 // Define callbacks BEFORE the useEffect that uses them
10081052 const fetchAliases = useCallback ( async ( ) => {
10091053 try {
@@ -2495,19 +2539,7 @@ export default function ProviderDetailPage() {
24952539 : t ( "openaiCompatibleDetails" ) }
24962540 </ h2 >
24972541 < p className = "text-sm text-text-muted" >
2498- { isAnthropicProtocolCompatible
2499- ? t ( "messagesApi" )
2500- : providerNode . apiType === "responses"
2501- ? t ( "responsesApi" )
2502- : t ( "chatCompletions" ) } { " " }
2503- · { ( providerNode . baseUrl || "" ) . replace ( / \/ $ / , "" ) } /
2504- { isCcCompatible
2505- ? ( providerNode . chatPath || CC_COMPATIBLE_DEFAULT_CHAT_PATH ) . replace ( / ^ \/ / , "" )
2506- : isAnthropicCompatible
2507- ? ( providerNode . chatPath || "/messages" ) . replace ( / ^ \/ / , "" )
2508- : providerNode . apiType === "responses"
2509- ? ( providerNode . chatPath || "/responses" ) . replace ( / ^ \/ / , "" )
2510- : ( providerNode . chatPath || "/chat/completions" ) . replace ( / ^ \/ / , "" ) }
2542+ { getApiLabel ( ) } · { ( providerNode . baseUrl || "" ) . replace ( / \/ $ / , "" ) } /{ getApiPath ( ) }
25112543 </ p >
25122544 </ div >
25132545 < div className = "flex items-center gap-2" >
@@ -3845,8 +3877,12 @@ function CustomModelsSection({
38453877 onChange = { ( e ) => setNewApiFormat ( e . target . value ) }
38463878 className = "w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"
38473879 >
3848- < option value = "chat-completions" > Chat Completions</ option >
3849- < option value = "responses" > Responses API</ option >
3880+ < option value = "chat-completions" > { t ( "chatCompletions" ) } </ option >
3881+ < option value = "responses" > { t ( "responsesApi" ) } </ option >
3882+ < option value = "embeddings" > { t ( "embeddings" ) } </ option >
3883+ < option value = "audio-transcriptions" > { t ( "audioTranscriptions" ) } </ option >
3884+ < option value = "audio-speech" > { t ( "audioSpeech" ) } </ option >
3885+ < option value = "images-generations" > { t ( "imagesGenerations" ) } </ option >
38503886 </ select >
38513887 </ div >
38523888 < div className = "flex-1" >
@@ -3972,8 +4008,12 @@ function CustomModelsSection({
39724008 onChange = { ( e ) => setEditingApiFormat ( e . target . value ) }
39734009 className = "w-full px-2.5 py-2 text-xs border border-border rounded-lg bg-background text-text-main focus:outline-none focus:border-primary"
39744010 >
3975- < option value = "chat-completions" > Chat Completions</ option >
3976- < option value = "responses" > Responses API</ option >
4011+ < option value = "chat-completions" > { t ( "chatCompletions" ) } </ option >
4012+ < option value = "responses" > { t ( "responsesApi" ) } </ option >
4013+ < option value = "embeddings" > { t ( "embeddings" ) } </ option >
4014+ < option value = "audio-transcriptions" > { t ( "audioTranscriptions" ) } </ option >
4015+ < option value = "audio-speech" > { t ( "audioSpeech" ) } </ option >
4016+ < option value = "images-generations" > { t ( "imagesGenerations" ) } </ option >
39774017 </ select >
39784018 </ div >
39794019 < div className = "flex min-w-0 flex-1 flex-wrap items-center gap-x-3 gap-y-1 overflow-x-auto overflow-y-visible [scrollbar-width:thin]" >
@@ -6092,6 +6132,10 @@ function EditCompatibleNodeModal({
60926132 const apiTypeOptions = [
60936133 { value : "chat" , label : t ( "chatCompletions" ) } ,
60946134 { value : "responses" , label : t ( "responsesApi" ) } ,
6135+ { value : "embeddings" , label : t ( "embeddings" ) } ,
6136+ { value : "audio-transcriptions" , label : t ( "audioTranscriptions" ) } ,
6137+ { value : "audio-speech" , label : t ( "audioSpeech" ) } ,
6138+ { value : "images-generations" , label : t ( "imagesGenerations" ) } ,
60956139 ] ;
60966140
60976141 const handleSubmit = async ( ) => {
0 commit comments