How to change the saved jupyter-ai completion model without launching JupyterLab?

I’m using jupyter-ai and would like to change the saved completion model without launching the JupyterLab IDE. I host JupyterLab development environments for a large group of users, and I want to redirect them to a new AI model provider without requiring them to launch JupyterLab and manually update their settings.

Subquestions:

  • Is there a way to override or reset the saved jupyter-ai configuration?
  • Where is the saved configuration stored? Even after deleting the virtual environment (which includes everything related to jupyter), the previously selected completion model persists when I reinstall and restart JupyterLab.

Yes, it is stored in a json config file, you may find the discussion in this issue useful: Config from file outside home directory · Issue #953 · jupyterlab/jupyter-ai · GitHub