Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Kick off provider endpoint CRUD structure#775

Closed
JAORMX wants to merge 1 commit intomainfrom
provider-endpoint-crud
Closed

Kick off provider endpoint CRUD structure#775
JAORMX wants to merge 1 commit intomainfrom
provider-endpoint-crud

Conversation

@JAORMX
Copy link
Contributor

@JAORMX JAORMX commented Jan 27, 2025

This structure will handle all the database operations and turn that
into the right models.

Note that for provider endpoints we already have a way of setting these
via configuration, so this is taken into account to output some sample
objects that users can leverage. We probably need to set some hardcoded
IDs sometime in the near future so we can reference these. But for now,
IDs for these are optional.

I also added a source field which allows us to tell where these
providers came from.

Signed-off-by: Juan Antonio Osorio ozz@stacklok.com

This structure will handle all the database operations and turn that
into the right models.

Note that for provider endpoints we already have a way of setting these
via configuration, so this is taken into account to output some sample
objects that users can leverage. We probably need to set some hardcoded
IDs sometime in the near future so we can reference these. But for now,
IDs for these are optional.

I also added a `source` field which allows us to tell where these
providers came from.

Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>
@JAORMX JAORMX force-pushed the provider-endpoint-crud branch from e6e34fe to 62d9aae Compare January 27, 2025 08:46
Comment on lines +173 to +174
config = "config"
db = "db"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably for a future PR but I think it's worth it to persist the provider information from config in DB. That way we can have a single source of truth

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is an excellent point for discussion. Are we planning to keep the provider configs? what do we do when a user changes the API endpoint from the config?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think from now on for muxing we should keep the provider configs

what do we do when a user changes the API endpoint from the config?

I don't know how common it is to change the API endpoint of an LLM provider. Right now, a user would need to stop CodeGate and start it again with new config in order to change the API endpoint.

Keeping the provider configs in DB and be able to change them without stopping the server gives a better UX IMO

@JAORMX JAORMX closed this Jan 27, 2025
@JAORMX JAORMX deleted the provider-endpoint-crud branch January 28, 2025 09:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants