You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d0f81e7
Browse filesBrowse the repository at this point in the historyBrowse files
feat: llmGateway.whenProxyUnavailable and a GitHub Copilot example
Proxy-unavailable policy
- While the daemon runs without its local LLM proxy, the programs behind it
used to remove their managed entries; for VS Code on GitHub's models that
removes the CAPI override, so Copilot Chat talks to GitHub directly, past
the gateway.
- `llmGateway.whenProxyUnavailable` now decides for `programs.copilot` and
`programs.vscode`: `failClosed` (default) leaves the managed files as they
are, so the tools stay pointed at the loopback port and fail; `failOpen`
removes them until the proxy is back. The program is `inactive` with a
reason that names the policy.
- Program removal, a mode switch, `useLlmGateway: false` and a missing
`proxyUrl` remove as before. The controller's configuration view offers the choice ("Fail open
without the local proxy") when a Copilot program is selected. Older daemons and controllers reject the key
(`deny_unknown_fields`); the default needs no key.
Example
- `examples/copilot/`: Dex, agentgateway, a daemon config and a step-by-step
guide for the Copilot CLI, VS Code on own models and VS Code on GitHub's
models, with what to check at each step (drift, conflicts, removal, the
proxy gone), plus the settings the GitHub organisation owner configures
(`github-side.md`).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`programs.copilot`makes the daemon write the Copilot CLI's BYOK provider
@@ -312,8 +347,9 @@ daemon's sidecar next to the file is gone, entries under the managed names
312
347
that carry a pairing header are replaced on the next apply, and those that
313
348
carry this daemon's own pairing value are removed when the program goes
314
349
away; entries with another pairing value are left alone. The file is written owner-only. Removing
315
-
`programs.copilot`, setting `useLlmGateway: false`, or running without the
316
-
proxy takes the managed entries out again and restores the user's file with
350
+
`programs.copilot` or setting `useLlmGateway: false` takes the managed
351
+
entries out again (running without the proxy depends on
352
+
`llmGateway.whenProxyUnavailable`, see **Without the proxy**) and restores the user's file with
317
353
its previous mode (deleted only if the daemon created it and nothing else is
318
354
left).
319
355
@@ -482,11 +518,14 @@ single-quoted string; the top level is not an object;
482
518
leaves the file untouched and blocks every managed file on the device until it
483
519
is resolved (and stops the daemon at startup); fix the file in VS Code and
484
520
re-apply (with `daemon.reconcileInterval` set, the next tick applies it). Removal (program
485
-
absent, `ownModels`, `useLlmGateway: false`, no gateway, no `proxyUrl`, or no
486
-
proxy, with a warning) takes the key and the two entries out and deletes the
487
-
file only if the daemon created it. Restart VS Code after an apply that changes
521
+
absent, `ownModels`, `useLlmGateway: false`, no gateway, or no `proxyUrl`)
522
+
takes the key and the two entries out and deletes the file only if the daemon
523
+
created it. Without the proxy, `llmGateway.whenProxyUnavailable` decides (see
524
+
**Without the proxy** above): the default keeps the override, so Copilot Chat
525
+
fails instead of reaching GitHub directly. Restart VS Code after an apply that changes
488
526
the file (first apply, re-pairing after a re-enrollment). There is no
489
-
`--dry-run` preview: a dry run has no proxy and plans a removal; `--once`
527
+
`--dry-run` preview: a dry run has no proxy, so it lists nothing for this file
528
+
under `failClosed` and the removal under `failOpen`; `--once`
490
529
refuses the program.
491
530
492
531
Caveats. `github.copilot.advanced.debug.overrideCapiUrl` is an undocumented
@@ -614,7 +653,7 @@ device-wide state. The device page in the controller lists them under
614
653
| `unchanged` | The program is configured and nothing needed to change. |
615
654
| `removed` | The program is no longer configured and its managed content was removed. |
616
655
| `conflict` | A managed file holds configuration the daemon will not overwrite; the detail names the file. |
617
-
| `inactive` | The program uses the LLM gateway but the local LLM proxy is not running (see `llmProxy.error` in daemon-info), so its files point nowhere and were removed. |
656
+
| `inactive` | The program uses the LLM gateway but the local LLM proxy is not running (see `llmProxy.error` in daemon-info): its entries were left pointing at the loopback port (`whenProxyUnavailable: failClosed`, the default) or removed (`failOpen`). |
618
657
| `blocked` | The program had changes, but none were written because another program conflicted or failed; the detail names that program. |
619
658
| `failed` | Planning or writing this program failed; the detail carries the error. |
"programs.copilot is configured but the local LLM proxy is not available; whenProxyUnavailable: failClosed, so the managed Copilot CLI providers are left as they are"
115
+
);
116
+
returnOk(());
117
+
}
111
118
tracing::debug!(
112
119
path = %path.display(),
113
-
"programs.copilot is configured but the local LLM proxy is not available, so the Copilot CLI is not pointed at the gateway; the reason is llmProxy.error in daemon-info (or daemon.llmProxy.listen is unset); removing the managed Copilot CLI providers"
120
+
"programs.copilot is configured but the local LLM proxy is not available, so the Copilot CLI is not pointed at the gateway; the reason is llmProxy.error in daemon-info (or daemon.llmProxy.listen is unset); whenProxyUnavailable: failOpen, removing the managed Copilot CLI providers"
"programs.vscode is configured but the local LLM proxy is not available; whenProxyUnavailable: failClosed, so the managed chat language models are left as they are"
110
+
);
111
+
returnOk(());
112
+
}
106
113
tracing::debug!(
107
114
path = %path.display(),
108
-
"programs.vscode is configured but the local LLM proxy is not available, so VS Code is not pointed at the gateway; the reason is llmProxy.error in daemon-info (or daemon.llmProxy.listen is unset); removing the managed chat language models"
115
+
"programs.vscode is configured but the local LLM proxy is not available, so VS Code is not pointed at the gateway; the reason is llmProxy.error in daemon-info (or daemon.llmProxy.listen is unset); whenProxyUnavailable: failOpen, removing the managed chat language models"
"programs.vscode uses copilotChat: githubModels but the local LLM proxy is not available; whenProxyUnavailable: failClosed, so the settings are left as they are"
519
+
);
520
+
returnOk(());
521
+
}
510
522
tracing::debug!(
511
523
path = %path.display(),
512
-
"programs.vscode uses copilotChat: githubModels but the local LLM proxy is not available, so VS Code is not pointed at the gateway; the reason is llmProxy.error in daemon-info (or daemon.llmProxy.listen is unset); removing the managed settings"
524
+
"programs.vscode uses copilotChat: githubModels but the local LLM proxy is not available, so VS Code is not pointed at the gateway; the reason is llmProxy.error in daemon-info (or daemon.llmProxy.listen is unset); whenProxyUnavailable: failOpen, removing the managed settings"
0 commit comments