Description
Description
When using OpenCommit with certain API providers or through corporate proxies, there is a need to add custom HTTP headers to API requests. This is particularly useful for authentication mechanisms like Basic Auth or when using API gateways that require specific headers.
Use Cases :
Using Basic Auth with self-hosted LLM servers (like private Ollama or Flowise instances)
Working with corporate proxies that require authentication headers
Adding API-specific headers for rate limiting or version control
Supporting API gateways that require custom headers for routing
Suggested Solution
Add a new configuration option OCO_API_CUSTOM_HEADERS
that accepts a JSON string of header key-value pairs. This would allow users to specify custom headers that should be included in all API requests.
Example usage:
# Set Basic Auth header
oco config set OCO_API_CUSTOM_HEADERS='{"Authorization": "Basic dXNlcm5hbWU6cGFzc3dvcmQ="}'
# Set multiple custom headers
oco config set OCO_API_CUSTOM_HEADERS='{"X-API-Version": "2", "X-Custom-Header": "value"}'
Alternatives
No response
Additional Context
No response
Activity