Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate shareable workspaces #1067

Open
lukehinds opened this issue Feb 15, 2025 · 7 comments
Open

Investigate shareable workspaces #1067

lukehinds opened this issue Feb 15, 2025 · 7 comments
Assignees

Comments

@lukehinds
Copy link
Contributor

Investigate a simple shareable workspace configuration, where a user could export a workspace, capturing prompts , provider config and muxing rules. This could be saved as file which someone else could then import.

@JAORMX
Copy link
Contributor

JAORMX commented Feb 15, 2025

I could look at this. Provider config is not workspace-scoped, but I'm sure we could make it work

@peppescg
Copy link
Contributor

I think this will impact the UI dashboard too. Cause I would expect to have a button in the dashboard and import/export the config ( keep in mind that muxing is actually available only in UI).

@JAORMX
Copy link
Contributor

JAORMX commented Feb 17, 2025

We agreed someone else will work on this. I can tag along and help out if needed.

@JAORMX
Copy link
Contributor

JAORMX commented Feb 17, 2025

I'll pair up with @alex-mcgovern

@alex-mcgovern
Copy link
Contributor

Actually picking this up now

@JAORMX
Copy link
Contributor

JAORMX commented Feb 19, 2025

#1086 added the basic configuration. It's hooked to the workspace creation REST API endpoint, but currently unused. I can see us parsing a JSON file with that content too as an alternative.

@alex-mcgovern
Copy link
Contributor

alex-mcgovern commented Feb 19, 2025

I think a north star for this should be a local JSON "CodeGate config", this would allow:

  • hand editing in editor-of-choice
  • checking in to version control (either per-repo or a .dotfiles repo)
  • sharing/distributing within a team

I'm imagining this could be stored in a number of places, e.g. $HOME/.config/codegate, in the currently open repository, etc. but that decision seems further down the road.

After speaking with Ozz, I think the best small increment to deliver initially is a small change to the REST API to update/read config. Am going to try and think about the API design such that we don't have to rework it many times towards the desired behaviour.

A future step might be to use a Docker bind mounts to enable local JSON config idea, in addition to editing it via the CRUD API.

What I'm imagining a local JSON config could look like in future.

{
    // ... other global config
    "workspaces": {
        "default": {
            "system_prompt": "",
            "muxing_rules": [
                {
                    "provider_name": "provider1",
                    "provider_id": "provider1_id",
                    "model": "model1",
                    "matcher_type": "catch_all",
                    "matcher": null
                },
                {
                    "provider_name": "provider2",
                    "provider_id": "provider2_id",
                    "model": "model2",
                    "matcher_type": "filename_match",
                    "matcher": "*.py"
                }
            ]
            // ... other workspace config
        },
        "foo": {
            "system_prompt": "",
            "muxing_rules": [
                {
                    "provider_name": "provider3",
                    "provider_id": "provider3_id",
                    "model": "model3",
                    "matcher_type": "request_type_match",
                    "matcher": "chat"
                }
            ]
            // ... other workspace config
        }
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants