feat: update openai/azure params (#1604)

* feat(openai): use max_completion_tokens & reasoning_effort params

* feat(openai): use developer prompt for reasoning models

* docs: update openai config in readme

* refactor: follow lua style quotes

* fix(azure): rename max_tokens to max_completion_tokens

* refactor(azure): remove duplicate field

* refactor: update types

* refactor(azure): update type
This commit is contained in:
kernitus
2025-03-18 11:40:20 +00:00
committed by GitHub
parent 62a8c07e91
commit 10ce065d9e
6 changed files with 33 additions and 33 deletions

View File

@@ -194,9 +194,10 @@ M._defaults = {
openai = {
endpoint = "https://api.openai.com/v1",
model = "gpt-4o",
timeout = 30000, -- Timeout in milliseconds
timeout = 30000, -- Timeout in milliseconds, increase this for reasoning models
temperature = 0,
max_tokens = 16384,
max_completion_tokens = 16384, -- Increase this to include reasoning tokens (for reasoning models)
reasoning_effort = "medium", -- low|medium|high, only used for reasoning models
},
---@type AvanteSupportedProvider
copilot = {
@@ -212,10 +213,11 @@ M._defaults = {
azure = {
endpoint = "", -- example: "https://<your-resource-name>.openai.azure.com"
deployment = "", -- Azure deployment name (e.g., "gpt-4o", "my-gpt-4o-deployment")
api_version = "2024-06-01",
timeout = 30000, -- Timeout in milliseconds
api_version = "2024-12-01-preview",
timeout = 30000, -- Timeout in milliseconds, increase this for reasoning models
temperature = 0,
max_tokens = 20480,
max_completion_tokens = 20480, -- Increase this to include reasoning tokens (for reasoning models)
reasoning_effort = "medium", -- low|medium|high, only used for reasoning models
},
---@type AvanteSupportedProvider
claude = {