@@ -46,16 +46,16 @@ function isHuggingFaceOpenAICompatible(url: string): boolean {
4646
4747 // Check for common OpenAI-compatible patterns
4848 const openAIPatterns = [
49- ' /v1/' , // Standard OpenAI v1 API pattern
50- ' /openai/' , // Explicit OpenAI compatibility path
51- ' /v1/chat/completions' , // Specific OpenAI chat completions endpoint
52- ' /v1/completions' , // OpenAI completions endpoint
53- ' /v1/embeddings' , // OpenAI embeddings endpoint
54- ' /v1/models' , // OpenAI models endpoint
49+ " /v1/" , // Standard OpenAI v1 API pattern
50+ " /openai/" , // Explicit OpenAI compatibility path
51+ " /v1/chat/completions" , // Specific OpenAI chat completions endpoint
52+ " /v1/completions" , // OpenAI completions endpoint
53+ " /v1/embeddings" , // OpenAI embeddings endpoint
54+ " /v1/models" , // OpenAI models endpoint
5555 ] ;
5656
5757 // Check if the URL contains any of the OpenAI-compatible patterns
58- return openAIPatterns . some ( pattern => normalizedUrl . includes ( pattern ) ) ;
58+ return openAIPatterns . some ( ( pattern ) => normalizedUrl . includes ( pattern ) ) ;
5959}
6060
6161export function constructLlmApi ( config : LLMConfig ) : BaseLlmApi | undefined {
@@ -105,7 +105,7 @@ export function constructLlmApi(config: LLMConfig): BaseLlmApi | undefined {
105105 case "sambanova" :
106106 return openAICompatible ( "https://api.sambanova.ai/v1/" , config ) ;
107107 case "text-gen-webui" :
108- return openAICompatible ( "http://127.0.0.1 :5000/v1/" , config ) ;
108+ return openAICompatible ( "http://********* :5000/v1/" , config ) ;
109109 case "openrouter" :
110110 return openAICompatible ( "https://openrouter.ai/api/v1/" , config ) ;
111111 case "cerebras" :
0 commit comments