mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 04:50:52 +08:00
Add support for localhost unauthenticated requests
- Introduced `AllowLocalhostUnauthenticated` flag allowing unauthenticated requests from localhost. - Updated authentication middleware to bypass checks for localhost when enabled. Add new Gemini CLI models and update model registry function - Introduced `GetGeminiCLIModels` for updated Gemini CLI model definitions. - Added new models: "Gemini 2.5 Flash Lite" and "Gemini 2.5 Pro". - Updated `RegisterModels` to use `GetGeminiCLIModels` in Gemini client initialization.
This commit is contained in:
@@ -40,10 +40,14 @@ type Config struct {
|
||||
// RequestRetry defines the retry times when the request failed.
|
||||
RequestRetry int `yaml:"request-retry"`
|
||||
|
||||
// ClaudeKey defines a list of Claude API key configurations as specified in the YAML configuration file.
|
||||
ClaudeKey []ClaudeKey `yaml:"claude-api-key"`
|
||||
|
||||
// OpenAICompatibility defines OpenAI API compatibility configurations for external providers.
|
||||
OpenAICompatibility []OpenAICompatibility `yaml:"openai-compatibility"`
|
||||
|
||||
// AllowLocalhostUnauthenticated allows unauthenticated requests from localhost.
|
||||
AllowLocalhostUnauthenticated bool `yaml:"allow-localhost-unauthenticated"`
|
||||
}
|
||||
|
||||
// QuotaExceeded defines the behavior when API quota limits are exceeded.
|
||||
|
||||
Reference in New Issue
Block a user