@hsupu/copilot-api 0.7.19 → 0.7.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config.example.yaml +44 -44
- package/dist/main.mjs +3685 -3534
- package/dist/main.mjs.map +1 -1
- package/package.json +1 -1
- package/ui/history-v1/script.js +1 -1
- package/ui/history-v3/dist/assets/{index-B6KgLHOe.css → index-CMA0Arxs.css} +1 -1
- package/ui/history-v3/dist/assets/index-DS5mAk0y.js +3 -0
- package/ui/history-v3/dist/assets/{vendor-C3jfkhqq.js → vendor-BGG3lVOP.js} +1 -1
- package/ui/history-v3/dist/assets/{vue-jlQnwi-P.js → vue-CJ6HbDRX.js} +1 -1
- package/ui/history-v3/dist/index.html +4 -4
- package/ui/history-v3/dist/assets/index-CpX1BZfT.js +0 -3
package/config.example.yaml
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
# Copy this file to ~/.local/share/copilot-api/config.yaml and customize as needed.
|
|
3
3
|
# All settings are hot-reloadable unless noted otherwise.
|
|
4
4
|
|
|
5
|
+
# ============================================================================
|
|
6
|
+
# Proxy
|
|
7
|
+
# ============================================================================
|
|
8
|
+
# Proxy URL for all outgoing requests to GitHub / Copilot APIs.
|
|
9
|
+
# Supports http://, https://, socks5://, socks5h:// schemes.
|
|
10
|
+
# socks5h:// routes DNS through the proxy (recommended for privacy).
|
|
11
|
+
# Authentication via URL credentials: socks5h://user:pass@host:port
|
|
12
|
+
# Takes precedence over HTTP_PROXY/HTTPS_PROXY environment variables.
|
|
13
|
+
# CLI --proxy flag takes precedence over this setting.
|
|
14
|
+
# NOT hot-reloadable (requires restart).
|
|
15
|
+
|
|
16
|
+
# proxy: "http://127.0.0.1:7890"
|
|
17
|
+
# proxy: "socks5h://127.0.0.1:1080"
|
|
18
|
+
# proxy: "socks5h://user:pass@proxy.example.com:1080"
|
|
19
|
+
|
|
5
20
|
# ============================================================================
|
|
6
21
|
# Model
|
|
7
22
|
# ============================================================================
|
|
@@ -33,21 +48,6 @@ model_overrides:
|
|
|
33
48
|
claude-sonnet-4.5: claude-sonnet-4.6 # Latest sonnet
|
|
34
49
|
claude-haiku-4.5: claude-sonnet-4.5 # Upgrade haiku to sonnet
|
|
35
50
|
|
|
36
|
-
# ============================================================================
|
|
37
|
-
# Proxy
|
|
38
|
-
# ============================================================================
|
|
39
|
-
# Proxy URL for all outgoing requests to GitHub / Copilot APIs.
|
|
40
|
-
# Supports http://, https://, socks5://, socks5h:// schemes.
|
|
41
|
-
# socks5h:// routes DNS through the proxy (recommended for privacy).
|
|
42
|
-
# Authentication via URL credentials: socks5h://user:pass@host:port
|
|
43
|
-
# Takes precedence over HTTP_PROXY/HTTPS_PROXY environment variables.
|
|
44
|
-
# CLI --proxy flag takes precedence over this setting.
|
|
45
|
-
# NOT hot-reloadable (requires restart).
|
|
46
|
-
|
|
47
|
-
# proxy: "http://127.0.0.1:7890"
|
|
48
|
-
# proxy: "socks5h://127.0.0.1:1080"
|
|
49
|
-
# proxy: "socks5h://user:pass@proxy.example.com:1080"
|
|
50
|
-
|
|
51
51
|
# ============================================================================
|
|
52
52
|
# Timeouts
|
|
53
53
|
# ============================================================================
|
|
@@ -64,17 +64,22 @@ stale_request_max_age: 600 # Max seconds an active request can live before t
|
|
|
64
64
|
# Safety net for requests that never complete/fail normally.
|
|
65
65
|
|
|
66
66
|
# ============================================================================
|
|
67
|
-
#
|
|
67
|
+
# Shutdown
|
|
68
68
|
# ============================================================================
|
|
69
|
-
#
|
|
70
|
-
# The rate limiter is enabled/disabled via --no-rate-limit CLI flag;
|
|
71
|
-
# these settings control its parameters when enabled.
|
|
69
|
+
# Control graceful shutdown timing.
|
|
72
70
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
shutdown:
|
|
72
|
+
graceful_wait: 60 # Phase 2: seconds to wait for in-flight requests to complete naturally (default: 60)
|
|
73
|
+
abort_wait: 120 # Phase 3: seconds to wait after abort signal for handlers to wrap up (default: 120)
|
|
74
|
+
|
|
75
|
+
# ============================================================================
|
|
76
|
+
# History
|
|
77
|
+
# ============================================================================
|
|
78
|
+
# Control history recording behavior.
|
|
79
|
+
|
|
80
|
+
history:
|
|
81
|
+
limit: 200 # Maximum number of entries to keep in memory (0 = unlimited, default: 200)
|
|
82
|
+
min_entries: 50 # Minimum entries to keep even under memory pressure (default: 50)
|
|
78
83
|
|
|
79
84
|
# ============================================================================
|
|
80
85
|
# Anthropic
|
|
@@ -82,10 +87,10 @@ rate_limiter:
|
|
|
82
87
|
# Settings for Anthropic API tool handling and timeouts.
|
|
83
88
|
|
|
84
89
|
anthropic:
|
|
85
|
-
|
|
90
|
+
strip_server_tools: false # Strip server-side tools (web_search, etc.) from requests
|
|
86
91
|
dedup_tool_calls: false # false | "input" | "result" (true = "input" for compat)
|
|
87
92
|
# "input": dedup by (name, input); "result": also require identical result
|
|
88
|
-
|
|
93
|
+
strip_read_tool_result_tags: false # Strip <system-reminder> tags from Read tool results
|
|
89
94
|
# rewrite_system_reminders: false # false = keep all (default), true = remove all
|
|
90
95
|
rewrite_system_reminders: # Or provide rewrite rules (first match wins, top-down).
|
|
91
96
|
# Note: `model` field is NOT supported here (only in system_prompt_overrides).
|
|
@@ -94,6 +99,19 @@ anthropic:
|
|
|
94
99
|
# - from: ".*" # Catch-all: keep unchanged (gms flags are automatic)
|
|
95
100
|
# to: "$0" # $0 = original content
|
|
96
101
|
|
|
102
|
+
# ============================================================================
|
|
103
|
+
# Rate Limiter
|
|
104
|
+
# ============================================================================
|
|
105
|
+
# Fine-tune the adaptive rate limiter behavior.
|
|
106
|
+
# The rate limiter is enabled/disabled via --no-rate-limit CLI flag;
|
|
107
|
+
# these settings control its parameters when enabled.
|
|
108
|
+
|
|
109
|
+
rate_limiter:
|
|
110
|
+
retry_interval: 10 # Seconds to wait before retrying after rate limit error
|
|
111
|
+
request_interval: 10 # Seconds between requests in rate-limited mode
|
|
112
|
+
recovery_timeout: 10 # Minutes before attempting recovery from rate-limited mode
|
|
113
|
+
consecutive_successes: 5 # Consecutive successes needed to exit rate-limited mode
|
|
114
|
+
|
|
97
115
|
# ============================================================================
|
|
98
116
|
# Auto-Truncate
|
|
99
117
|
# ============================================================================
|
|
@@ -104,24 +122,6 @@ anthropic:
|
|
|
104
122
|
# context size before resorting to message removal. Default: true.
|
|
105
123
|
# compress_tool_results_before_truncate: false
|
|
106
124
|
|
|
107
|
-
# ============================================================================
|
|
108
|
-
# History
|
|
109
|
-
# ============================================================================
|
|
110
|
-
# Control history recording behavior.
|
|
111
|
-
|
|
112
|
-
# Maximum number of history entries to keep in memory.
|
|
113
|
-
# 0 = unlimited. Default: 200.
|
|
114
|
-
history_limit: 200
|
|
115
|
-
|
|
116
|
-
# ============================================================================
|
|
117
|
-
# Shutdown
|
|
118
|
-
# ============================================================================
|
|
119
|
-
# Control graceful shutdown timing.
|
|
120
|
-
|
|
121
|
-
shutdown:
|
|
122
|
-
graceful_wait: 60 # Phase 2: seconds to wait for in-flight requests to complete naturally (default: 60)
|
|
123
|
-
abort_wait: 120 # Phase 3: seconds to wait after abort signal for handlers to wrap up (default: 120)
|
|
124
|
-
|
|
125
125
|
# ============================================================================
|
|
126
126
|
# System Prompt
|
|
127
127
|
# ============================================================================
|