Skip to content

Credentials : Standardized fetching for /create-collection endpoint #226

Open
@nishika26

Description

@nishika26

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.

  1. We need to refactor the /collections endpoint to:

  2. Fetch OpenAI credentials using the get_provider_credential function, scoped by org_id and project_id.

  3. Ensure that project_id is passed in the request and is used correctly in the credential fetching process.

  4. Handle missing or invalid credentials: If the credentials are missing or invalid, the endpoint should return an appropriate failure response.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

To Do

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions