{"repo": "alhza/gpt-load", "files": {"internal/utils/url_utils.go": {"849b66f395612d26cdb694f54a448c954b9dce53": {"t": 1785746058.5212073, "n": 1510, "h": "1ce6fa18bdc17e66", "c": "package utils\n\nimport \"strings\"\n\n// NormalizeProviderURL automatically fixes common URL misconfigurations for known providers\n// This ensures consistent behavior across model fetching, key validation, and proxy requests\nfunc NormalizeProviderURL(url string) string {\n\turl = strings.TrimSuffix(url, \"/\")\n\n\t// OpenRouter requires /api prefix for all endpoints\n\t// Auto-fix: https://openrouter.ai -> https://openrouter.ai/api\n\tif strings.HasPrefix(url, \"https://openrouter.ai\") && !strings.Contains(url, \"/api\") {\n\t\treturn url + \"/api\"\n\t}\n\n\t// DeepSeek API (OpenAI compatible)\n\t// Standard format: https://api.deepseek.com\n\t// No auto-fix needed - users should configure correctly\n\n\t// Moonshot API (OpenAI compatible)\n\t// Standard format: https://api.moonshot.cn\n\t// No auto-fix needed - users should configure correctly\n\n\t// Azure OpenAI (OpenAI compatible)\n\t// Format: https://{resource-name}.openai.azure.com\n\t// No auto-fix needed - path includes deployment name\n\n\t// Anthropic Claude API\n\t// Standard format: https://api.anthropic.com\n\t// No auto-fix needed - uses /v1/messages endpoint\n\n\t// Google Gemini API\n\t// Standard format: https://generativelanguage.googleapis.com\n\t// No auto-fix needed - uses /v1beta/models endpoint\n\n\t// OpenAI Official API\n\t// Standard format: https://api.openai.com\n\t// No auto-fix needed - standard OpenAI format\n\n\t// Add more provider-specific normalizations here as needed\n\t// Only add auto-fix rules for providers that commonly have URL configuration issues\n\n\treturn url\n}\n"}, "f7770887b54cbf6a7890d1de67d669d0b0d43483": {"t": 1785759330.649219, "n": 1510, "h": "1ce6fa18bdc17e66", "c": "package utils\n\nimport \"strings\"\n\n// NormalizeProviderURL automatically fixes common URL misconfigurations for known providers\n// This ensures consistent behavior across model fetching, key validation, and proxy requests\nfunc NormalizeProviderURL(url string) string {\n\turl = strings.TrimSuffix(url, \"/\")\n\n\t// OpenRouter requires /api prefix for all endpoints\n\t// Auto-fix: https://openrouter.ai -> https://openrouter.ai/api\n\tif strings.HasPrefix(url, \"https://openrouter.ai\") && !strings.Contains(url, \"/api\") {\n\t\treturn url + \"/api\"\n\t}\n\n\t// DeepSeek API (OpenAI compatible)\n\t// Standard format: https://api.deepseek.com\n\t// No auto-fix needed - users should configure correctly\n\n\t// Moonshot API (OpenAI compatible)\n\t// Standard format: https://api.moonshot.cn\n\t// No auto-fix needed - users should configure correctly\n\n\t// Azure OpenAI (OpenAI compatible)\n\t// Format: https://{resource-name}.openai.azure.com\n\t// No auto-fix needed - path includes deployment name\n\n\t// Anthropic Claude API\n\t// Standard format: https://api.anthropic.com\n\t// No auto-fix needed - uses /v1/messages endpoint\n\n\t// Google Gemini API\n\t// Standard format: https://generativelanguage.googleapis.com\n\t// No auto-fix needed - uses /v1beta/models endpoint\n\n\t// OpenAI Official API\n\t// Standard format: https://api.openai.com\n\t// No auto-fix needed - standard OpenAI format\n\n\t// Add more provider-specific normalizations here as needed\n\t// Only add auto-fix rules for providers that commonly have URL configuration issues\n\n\treturn url\n}\n"}}}}