mirror of
https://github.com/qodo-ai/pr-agent.git
synced 2025-07-04 21:00:40 +08:00
doc update and minor fix
This commit is contained in:
@ -37,6 +37,17 @@ model="" # the OpenAI model you've deployed on Azure (e.g. gpt-4o)
|
|||||||
fallback_models=["..."]
|
fallback_models=["..."]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
To use Azure AD (Entra id) based authentication set in your `.secrets.toml` (working from CLI), or in the GitHub `Settings > Secrets and variables` (working from GitHub App or GitHub Action):
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[azure_ad]
|
||||||
|
client_id = "" # Your Azure AD application client ID
|
||||||
|
client_secret = "" # Your Azure AD application client secret
|
||||||
|
tenant_id = "" # Your Azure AD tenant ID
|
||||||
|
api_base = "" # Your Azure OpenAI service base URL (e.g., https://openai.xyz.com/)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
Passing custom headers to the underlying LLM Model API can be done by setting extra_headers parameter to litellm.
|
Passing custom headers to the underlying LLM Model API can be done by setting extra_headers parameter to litellm.
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
|
@ -100,6 +100,7 @@ class LiteLLMAIHandler(BaseAiHandler):
|
|||||||
|
|
||||||
# Check for Azure AD configuration
|
# Check for Azure AD configuration
|
||||||
if get_settings().get("AZURE_AD.CLIENT_ID", None):
|
if get_settings().get("AZURE_AD.CLIENT_ID", None):
|
||||||
|
from azure.identity import ClientSecretCredential
|
||||||
self.azure = True
|
self.azure = True
|
||||||
# Generate access token using Azure AD credentials from settings
|
# Generate access token using Azure AD credentials from settings
|
||||||
access_token = self._get_azure_ad_token()
|
access_token = self._get_azure_ad_token()
|
||||||
|
Reference in New Issue
Block a user