User-Provided Azure OpenAI API Credentials
Open
@FATEH02 is already working on this.
Since Aug 14, 2025.
enhancement
- Dominant language
- JavaScript
- Stars
- 382
- Forks
- 76
- Avg merge
- 3m
- Merged PRs (30d)
- 4
Description
Feature Request: User-Provided Azure OpenAI API Credentials
Overview
Currently, the application uses hardcoded Azure OpenAI credentials from environment variables. We want to implement a feature that allows users to provide their own Azure OpenAI API credentials through the frontend, which will be passed to the backend for LLM operations.
✨ Motivation
- Users may want to use their own Azure OpenAI keys instead of relying on shared credentials.
- This promotes transparency, flexibility, and improved access control.
- However, users must feel confident that their credentials will not be leaked or misused.
🔐 Security & Trust Requirements
- ✅ No logging or server-side storage of credentials.
- ✅ Credentials must be used only for the current session/request and discarded immediately after use.
- ✅ Frontend UI should clearly state that credentials are not stored or shared.
- ✅ Inputs should be securely handled via HTTPS and never exposed in
localStorageorsessionStorage. - ✅ Validate input formats and show helpful error messages if credentials are invalid.
Technical Requirements
Backend Changes
- Modify the
/api/chatendpoint to accept Azure OpenAI credentials in the request payload - Update the
stream_llm_responsefunction to use provided credentials instead of environment variables - Add input validation for the API credentials
@app.route('/api/chat', methods=['POST'])
async def chat():
data = request.get_json()
# New credential fields
azure_endpoint = data.get("azureEndpoint")
api_key = data.get("apiKey")
deployment = data.get("deployment")
api_version = data.get("apiVersion", "2023-05-15")
# Validate credentials
if not all([azure_endpoint, api_key, deployment]):
return jsonify({"error": "Missing required Azure OpenAI credentials"}), 400
# Rest of the existing function...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.