Skip to content

Support using a server side proxy to forward requests to AI providers #144

@jtpio

Description

@jtpio

Problem

Currently API keys are managed in the browser (or via https://github.com/jupyterlab-contrib/jupyter-secrets-manager), and the requests are also made from the browser.

This is convenient and makes it really easy to use an existing provider without running anything extra locally.

However, this can lead to some potential security issues since the API keys may be stored in the browser local storage.

Proposed Solution

There should be a way to allow proxying the requests to a component or proxy running on a server. That component and/or proxy will be responsible for forwarding the request to the corresponding AI provider with the proper API keys.

When using this extension in stock JupyterLab, this could take the form of a simple Jupyter Server extension.

With JupyterLite, this could be a dedicated Node.js or Python application that could easily be hosted on serverless platforms like Vercel, Netlify, or Cloudflare Workers.

Additional context

In any case, this should be optional and easily configurable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions