Fixing the ‘No utility model is configured’ Error for Copilot BYOK in VS Code

When working with Bring Your Own Key (BYOK) models in Visual Studio Code’s GitHub Copilot chat, you might encounter a configuration error preventing the agent from completing your requests. This error typically presents itself as:

No utility model is configured for ‘copilot-utility-small’ while the selected main agent model is BYOK.

Visual Studio Code Settings for BYOK

Understanding the “No Utility Model is Configured” Error

This issue occurs because GitHub Copilot relies on a lightweight “utility” model for various background tasks, such as generating titles for chat conversations or determining context. When you switch your primary agent to a custom BYOK model, the Copilot extension may not automatically fall back to a utility model for these secondary tasks, resulting in the error message.

How to Fix the Copilot Utility Model Error

Fortunately, resolving this configuration issue is straightforward and can be done entirely within your Visual Studio Code settings.

Successful configuration in VS Code Settings

Follow these steps to configure the utility model:

  1. Navigate to File > Preferences > Settings (or press Ctrl + , on Windows/Linux, Cmd + , on macOS).
  2. In the settings search bar at the top, type in byok to filter the relevant Copilot configurations.
  3. Locate the setting for the utility model. Here, you need to assign a model to handle these background tasks. You can either select your configured BYOK model again or choose the default model provided by GitHub Copilot.

After adjusting the configuration, the error should no longer appear, allowing your BYOK model to function seamlessly within the Copilot chat interface.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.