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
- `--rate-limit <seconds>`: Enforces a minimum time interval between requests. For example, `copilot-api start --rate-limit 30` will ensure there's at least a 30-second gap between requests.
337
338
- `--wait`: Use this with `--rate-limit`. It makes the server waitfor the cooldown period to end instead of rejecting the request with an error. This is useful for clients that don't automatically retry on rate limit errors.
338
339
- If you have a GitHub business or enterprise plan account with Copilot, use the `--account-type` flag (e.g., `--account-type business`). See the [official documentation](https://docs.github.com/en/enterprise-cloud@latest/copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/managing-github-copilot-access-to-your-organizations-network#configuring-copilot-subscription-based-network-routing-for-your-enterprise-or-organization) for more details.
340
+
341
+
## Request Header Modes
342
+
343
+
Copilot API supports two header modes to balance cost optimization with compatibility:
344
+
345
+
### `savings` Mode (Default)
346
+
347
+
Maximum cost optimization using current behavior:
348
+
349
+
- **Headers**: Only `X-Initiator`
350
+
- **Logic**: Set to `agent` when assistant/tool messages present, otherwise `user`
- **Use case**: Use this when you want to mimic the behavior of the VS Code extension to avoid potential abuse detection. (I am not sure if they do that, but it's better to be cautious.)
0 commit comments