Commit ed35872
committed
fix(settings): address Codex bot review on CPA auto-discovery
- Don't auto-probe on API key changes. Key is only sent when user
explicitly clicks "Test connection" or when baseUrl/wire changes
(where they already implicitly authorize a probe by editing the
endpoint). Avoids leaking keys to typo'd or malicious hosts.
- Use a monotonic seq counter to discard stale async responses.
Fixes race where a slow older probe could overwrite newer state
and default-model selection.
Signed-off-by: hqhq1025 <1506751656@qq.com>1 parent 616acaf commit ed35872
1 file changed
Lines changed: 4 additions & 2 deletions
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| |||
122 | 123 | | |
123 | 124 | | |
124 | 125 | | |
| 126 | + | |
125 | 127 | | |
126 | 128 | | |
127 | 129 | | |
128 | 130 | | |
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
| 134 | + | |
132 | 135 | | |
133 | 136 | | |
134 | 137 | | |
| |||
139 | 142 | | |
140 | 143 | | |
141 | 144 | | |
142 | | - | |
| 145 | + | |
143 | 146 | | |
144 | 147 | | |
145 | 148 | | |
| |||
152 | 155 | | |
153 | 156 | | |
154 | 157 | | |
155 | | - | |
156 | 158 | | |
157 | 159 | | |
158 | 160 | | |
| |||
0 commit comments