mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 04:50:52 +08:00
Add claude code support
This commit is contained in:
@@ -36,6 +36,8 @@ type Config struct {
|
||||
|
||||
// RequestLog enables or disables detailed request logging functionality.
|
||||
RequestLog bool `yaml:"request-log"`
|
||||
|
||||
ClaudeKey []ClaudeKey `yaml:"claude-api-key"`
|
||||
}
|
||||
|
||||
// QuotaExceeded defines the behavior when API quota limits are exceeded.
|
||||
@@ -48,6 +50,11 @@ type QuotaExceeded struct {
|
||||
SwitchPreviewModel bool `yaml:"switch-preview-model"`
|
||||
}
|
||||
|
||||
type ClaudeKey struct {
|
||||
APIKey string `yaml:"api-key"`
|
||||
BaseURL string `yaml:"base-url"`
|
||||
}
|
||||
|
||||
// LoadConfig reads a YAML configuration file from the given path,
|
||||
// unmarshals it into a Config struct, applies environment variable overrides,
|
||||
// and returns it.
|
||||
|
||||
Reference in New Issue
Block a user