Open
Description
Describe the bug
Currently, the /collections endpoint is not utilizing the organization-specific OpenAI credentials when creating collections. Instead, it is directly relying on settings (e.g., settings.OPENAI_API_KEY). This bypasses the necessary logic to ensure that OpenAI credentials are correctly scoped by org_id and project_id.
-
We need to refactor the /collections endpoint to:
-
Fetch OpenAI credentials using the get_provider_credential function, scoped by org_id and project_id.
-
Ensure that project_id is passed in the request and is used correctly in the credential fetching process.
-
Handle missing or invalid credentials: If the credentials are missing or invalid, the endpoint should return an appropriate failure response.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
To Do