gitlab-ai-provider 6.13.0 → 6.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/README.md +28 -1
- package/dist/gitlab-ai-provider-6.15.0.tgz +0 -0
- package/dist/index.d.mts +61 -1
- package/dist/index.d.ts +61 -1
- package/dist/index.js +256 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +256 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/gitlab-ai-provider-6.13.0.tgz +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## 6.15.0 (2026-09-07)
|
|
6
|
+
|
|
7
|
+
- Merge branch 'feature-add-gpt-6-astra' into 'main' ([19d1e4f](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/19d1e4f))
|
|
8
|
+
- feat(models): add GPT-6 Astra model mappings ([a636486](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/a636486))
|
|
9
|
+
|
|
10
|
+
## 6.14.0 (2026-09-04)
|
|
11
|
+
|
|
12
|
+
- Merge branch 'reasoning-controls' into 'main' ([7e13eb7](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/7e13eb7))
|
|
13
|
+
- feat(agentic): add configurable reasoning controls ([afb4850](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/afb4850))
|
|
14
|
+
|
|
5
15
|
## 6.13.0 (2026-09-02)
|
|
6
16
|
|
|
7
17
|
- Merge branch 'feature-add-fable-5-1' into 'main' ([4c4196b](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/4c4196b))
|
package/README.md
CHANGED
|
@@ -132,6 +132,7 @@ const customModel = gitlab.agenticChat('duo-chat-opus-4-5', {
|
|
|
132
132
|
| `duo-chat-opus-4-5` | Anthropic | `claude-opus-4-5-20251101` |
|
|
133
133
|
| `duo-chat-sonnet-4-5` | Anthropic | `claude-sonnet-4-5-20250929` |
|
|
134
134
|
| `duo-chat-haiku-4-5` | Anthropic | `claude-haiku-4-5-20251001` |
|
|
135
|
+
| `duo-chat-gpt-6-astra` | OpenAI | `gpt-6-astra` |
|
|
135
136
|
| `duo-chat-gpt-5-6-sol` | OpenAI | `gpt-5.6-sol` |
|
|
136
137
|
| `duo-chat-gpt-5-6-terra` | OpenAI | `gpt-5.6-terra` |
|
|
137
138
|
| `duo-chat-gpt-5-6-luna` | OpenAI | `gpt-5.6-luna` |
|
|
@@ -174,11 +175,32 @@ const { text: quickResponse } = await generateText({
|
|
|
174
175
|
|
|
175
176
|
// GPT-5 Codex - Optimized for code
|
|
176
177
|
const { text: codeExplanation } = await generateText({
|
|
177
|
-
model: gitlab.agenticChat('duo-chat-gpt-5-codex'
|
|
178
|
+
model: gitlab.agenticChat('duo-chat-gpt-5-codex', {
|
|
179
|
+
reasoningEffort: 'high',
|
|
180
|
+
}),
|
|
178
181
|
prompt: 'Refactor this function for better performance',
|
|
179
182
|
});
|
|
180
183
|
```
|
|
181
184
|
|
|
185
|
+
OpenAI models accept reasoning efforts from `none` through `max`, depending on the selected model. The effort is sent as `reasoning.effort` on the Responses API models and as `reasoning_effort` on the Chat Completions API models. Anthropic models accept `enabled` thinking with a token budget, `disabled` thinking, or `adaptive` thinking with an effort level:
|
|
186
|
+
|
|
187
|
+
```typescript
|
|
188
|
+
// budget-based thinking (e.g. Claude Sonnet 4.6)
|
|
189
|
+
const sonnet = gitlab.agenticChat('duo-chat-sonnet-4-6', {
|
|
190
|
+
thinking: { type: 'enabled', budgetTokens: 4096 },
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
// adaptive thinking (required by effort-based models such as Claude Opus 4.8,
|
|
194
|
+
// which reject `thinking.type.enabled`)
|
|
195
|
+
const opus = gitlab.agenticChat('duo-chat-opus-4-8', {
|
|
196
|
+
thinking: { type: 'adaptive', effort: 'high' },
|
|
197
|
+
});
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Adaptive thinking is serialized as `thinking: { type: 'adaptive' }` plus a sibling `output_config: { effort }`. Both settings can also be passed per request under `providerOptions.gitlab`. Per-request values take precedence over the model defaults, which allows hosts such as OpenCode to implement model variants.
|
|
201
|
+
|
|
202
|
+
When Anthropic thinking is active (`enabled` or `adaptive`), the provider automatically drops `temperature` and omits any `top_p` outside the `[0.95, 1]` range, since Anthropic rejects those sampling parameters while extended thinking is engaged. Thinking blocks returned by Anthropic are surfaced as AI SDK `reasoning` parts (carrying the block signature under `providerOptions.gitlab`) and replayed unmodified on subsequent turns, as required during tool-use loops.
|
|
203
|
+
|
|
182
204
|
**OpenAI Models with Tool Calling:**
|
|
183
205
|
|
|
184
206
|
```typescript
|
|
@@ -713,6 +735,11 @@ interface GitLabProviderSettings {
|
|
|
713
735
|
interface GitLabAgenticOptions {
|
|
714
736
|
providerModel?: string; // Override the backend model (e.g., 'claude-sonnet-4-5-20250929' or 'gpt-5.1-2025-11-13')
|
|
715
737
|
maxTokens?: number; // Default: 8192
|
|
738
|
+
reasoningEffort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max'; // OpenAI models (Responses + Chat Completions)
|
|
739
|
+
thinking?: // Anthropic models
|
|
740
|
+
| { type: 'disabled' }
|
|
741
|
+
| { type: 'enabled'; budgetTokens: number }
|
|
742
|
+
| { type: 'adaptive'; effort: 'low' | 'medium' | 'high' | 'xhigh' | 'max' };
|
|
716
743
|
featureFlags?: Record<string, boolean>; // GitLab feature flags
|
|
717
744
|
aiGatewayHeaders?: Record<string, string>; // Custom headers for AI Gateway proxy (per-model)
|
|
718
745
|
}
|
|
Binary file
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
import { LanguageModelV3, LanguageModelV3CallOptions, LanguageModelV3GenerateResult, LanguageModelV3StreamResult, LanguageModelV3Content, LanguageModelV3FinishReason, LanguageModelV3Usage, LanguageModelV3StreamPart } from '@ai-sdk/provider';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Extended thinking configuration for Anthropic Messages API models.
|
|
6
|
+
*
|
|
7
|
+
* - `enabled`/`disabled` map to the Anthropic `thinking` field directly. `enabled`
|
|
8
|
+
* requires a `budgetTokens` value that is less than the request's max tokens.
|
|
9
|
+
* - `adaptive` is required by effort-based models (e.g. Claude Opus 4.8), which
|
|
10
|
+
* reject `thinking.type.enabled`. It is serialized as `thinking: { type: 'adaptive' }`
|
|
11
|
+
* plus a sibling `output_config: { effort }`.
|
|
12
|
+
*/
|
|
13
|
+
type GitLabThinkingConfig = {
|
|
14
|
+
type: 'disabled';
|
|
15
|
+
} | {
|
|
16
|
+
type: 'enabled';
|
|
17
|
+
budgetTokens: number;
|
|
18
|
+
} | {
|
|
19
|
+
type: 'adaptive';
|
|
20
|
+
effort: 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
21
|
+
};
|
|
4
22
|
interface GitLabAnthropicConfig {
|
|
5
23
|
provider: string;
|
|
6
24
|
instanceUrl: string;
|
|
@@ -26,6 +44,7 @@ interface GitLabAnthropicConfig {
|
|
|
26
44
|
* @default 8192
|
|
27
45
|
*/
|
|
28
46
|
maxTokens?: number;
|
|
47
|
+
thinking?: GitLabThinkingConfig;
|
|
29
48
|
/**
|
|
30
49
|
* Feature flags to pass to the GitLab API
|
|
31
50
|
* @default { DuoAgentPlatformNext: true }
|
|
@@ -108,6 +127,30 @@ declare class GitLabAnthropicLanguageModel implements LanguageModelV3 {
|
|
|
108
127
|
*/
|
|
109
128
|
private convertFinishReason;
|
|
110
129
|
private createUsage;
|
|
130
|
+
/**
|
|
131
|
+
* Translates the camelCase GitLab thinking config into the Anthropic Messages
|
|
132
|
+
* request fields. `adaptive` is required by effort-based models such as Claude
|
|
133
|
+
* Opus 4.8 and pairs `thinking: { type: 'adaptive' }` with a sibling
|
|
134
|
+
* `output_config: { effort }`; `enabled`/`disabled` map through directly.
|
|
135
|
+
*/
|
|
136
|
+
private buildThinkingParams;
|
|
137
|
+
/** Per-call thinking configuration takes precedence over the model-level default. */
|
|
138
|
+
private resolveThinkingConfig;
|
|
139
|
+
private validateThinkingConfig;
|
|
140
|
+
/**
|
|
141
|
+
* Rebuild an Anthropic thinking block from a prior-turn reasoning part.
|
|
142
|
+
* Anthropic requires thinking blocks to be replayed unmodified (with their
|
|
143
|
+
* signature) during tool-use loops; the signature / redacted payload are
|
|
144
|
+
* carried in the reasoning part's provider metadata under `gitlab`.
|
|
145
|
+
*/
|
|
146
|
+
private convertReasoningPart;
|
|
147
|
+
private isThinkingActive;
|
|
148
|
+
/**
|
|
149
|
+
* Anthropic rejects `temperature` changes while thinking is active and requires
|
|
150
|
+
* `top_p` within [0.95, 1]; drop those params when thinking is engaged so the
|
|
151
|
+
* gateway does not 400. Undefined values are omitted either way.
|
|
152
|
+
*/
|
|
153
|
+
private buildSamplingParams;
|
|
111
154
|
doGenerate(options: LanguageModelV3CallOptions): Promise<LanguageModelV3GenerateResult>;
|
|
112
155
|
private doGenerateWithRetry;
|
|
113
156
|
doStream(options: LanguageModelV3CallOptions): Promise<LanguageModelV3StreamResult>;
|
|
@@ -1009,6 +1052,16 @@ interface GitLabAgenticOptions {
|
|
|
1009
1052
|
* @default 8192
|
|
1010
1053
|
*/
|
|
1011
1054
|
maxTokens?: number;
|
|
1055
|
+
/**
|
|
1056
|
+
* Default reasoning effort for OpenAI models.
|
|
1057
|
+
* Can be overridden per call through `providerOptions.gitlab.reasoningEffort`.
|
|
1058
|
+
*/
|
|
1059
|
+
reasoningEffort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
1060
|
+
/**
|
|
1061
|
+
* Default extended thinking configuration for Anthropic Messages API models.
|
|
1062
|
+
* Can be overridden per call through `providerOptions.gitlab.thinking`.
|
|
1063
|
+
*/
|
|
1064
|
+
thinking?: GitLabThinkingConfig;
|
|
1012
1065
|
/**
|
|
1013
1066
|
* Feature flags to pass to the GitLab API
|
|
1014
1067
|
*/
|
|
@@ -1097,6 +1150,7 @@ interface GitLabOpenAIConfig {
|
|
|
1097
1150
|
refreshApiKey?: () => Promise<void>;
|
|
1098
1151
|
openaiModel?: string;
|
|
1099
1152
|
maxTokens?: number;
|
|
1153
|
+
reasoningEffort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
1100
1154
|
featureFlags?: {
|
|
1101
1155
|
DuoAgentPlatformNext: true;
|
|
1102
1156
|
} & Record<string, boolean>;
|
|
@@ -1136,6 +1190,12 @@ declare class GitLabOpenAILanguageModel implements LanguageModelV3 {
|
|
|
1136
1190
|
* a hint that the gateway may be rejecting the request due to tool count.
|
|
1137
1191
|
*/
|
|
1138
1192
|
private formatOpenAIError;
|
|
1193
|
+
/**
|
|
1194
|
+
* Per-call `providerOptions.gitlab.reasoningEffort` takes precedence over the
|
|
1195
|
+
* model-level default.
|
|
1196
|
+
*/
|
|
1197
|
+
private resolveReasoningEffort;
|
|
1198
|
+
private asOpenAIReasoningEffort;
|
|
1139
1199
|
private convertTools;
|
|
1140
1200
|
private convertToolChoice;
|
|
1141
1201
|
private convertPrompt;
|
|
@@ -1791,4 +1851,4 @@ interface WorkflowDiscoveryResult {
|
|
|
1791
1851
|
}
|
|
1792
1852
|
declare function discoverWorkflowModels(config: WorkflowDiscoveryConfig, options: WorkflowDiscoveryOptions): Promise<WorkflowDiscoveryResult>;
|
|
1793
1853
|
|
|
1794
|
-
export { AGENT_PRIVILEGES, type ActionResponsePayload, type AdditionalContext, type AiChatAvailableModels, type AiModel, type ApprovalDecision, BUNDLED_CLIENT_ID, CLIENT_VERSION, type ClientEvent, DEFAULT_AGENT_PRIVILEGES, DEFAULT_AI_GATEWAY_URL, DEFAULT_CLIENT_CAPABILITIES, DEFAULT_WORKFLOW_DEFINITION, type DirectAccessToken, type DiscoveredModels, type DiscoveredWorkflowModel, GITLAB_COM_URL, type GenerateTokenResponse, type GitLabAgenticOptions, type GitLabAnthropicConfig, GitLabAnthropicLanguageModel, GitLabDirectAccessClient, type GitLabDirectAccessConfig, GitLabError, type GitLabErrorOptions, GitLabModelCache, GitLabModelConfigRegistry, GitLabModelDiscovery, GitLabOAuthManager, type GitLabOAuthTokenResponse, type GitLabOAuthTokens, type GitLabOpenAIConfig, GitLabOpenAILanguageModel, type GitLabProject, GitLabProjectCache, GitLabProjectDetector, type GitLabProjectDetectorConfig, type GitLabProvider, type GitLabProviderSettings, GitLabWorkflowClient, type GitLabWorkflowClientConfig, GitLabWorkflowLanguageModel, type GitLabWorkflowLanguageModelConfig, type GitLabWorkflowOptions, GitLabWorkflowTokenClient, MODEL_ID_TO_ANTHROPIC_MODEL, MODEL_MAPPINGS, type McpToolDefinition, type ModelCacheEntry, type ModelConfig, type ModelConfigRegistryOptions, type ModelDiscoveryConfig, type ModelMapping, type ModelProvider, type NewCheckpoint, OAUTH_SCOPES, OPENCODE_GITLAB_AUTH_CLIENT_ID, type OpenAIApiType, type OpenCodeAuth, type OpenCodeAuthApi, type OpenCodeAuthOAuth, type RunMcpTool, type StartRequest, TOKEN_EXPIRY_SKEW_MS, VERSION, WORKFLOW_ENVIRONMENT, WS_HEARTBEAT_INTERVAL_MS, WS_KEEPALIVE_PING_INTERVAL_MS, type WorkflowAction, type WorkflowClientEvent, type WorkflowDiscoveryConfig, type WorkflowDiscoveryOptions, type WorkflowDiscoveryResult, type WorkflowStatus, type WorkflowToolExecutor, WorkflowType, type WorkflowWebSocketOptions, createGitLab, discoverWorkflowModels, getAnthropicModelForModelId, getModelMapping, getOpenAIApiType, getOpenAIModelForModelId, getProviderForModelId, getValidModelsForProvider, getWorkflowModelRef, gitlab, gitlabOAuthTokenResponseSchema, isResponsesApiModel, isWorkflowModel, parseModelsYml };
|
|
1854
|
+
export { AGENT_PRIVILEGES, type ActionResponsePayload, type AdditionalContext, type AiChatAvailableModels, type AiModel, type ApprovalDecision, BUNDLED_CLIENT_ID, CLIENT_VERSION, type ClientEvent, DEFAULT_AGENT_PRIVILEGES, DEFAULT_AI_GATEWAY_URL, DEFAULT_CLIENT_CAPABILITIES, DEFAULT_WORKFLOW_DEFINITION, type DirectAccessToken, type DiscoveredModels, type DiscoveredWorkflowModel, GITLAB_COM_URL, type GenerateTokenResponse, type GitLabAgenticOptions, type GitLabAnthropicConfig, GitLabAnthropicLanguageModel, GitLabDirectAccessClient, type GitLabDirectAccessConfig, GitLabError, type GitLabErrorOptions, GitLabModelCache, GitLabModelConfigRegistry, GitLabModelDiscovery, GitLabOAuthManager, type GitLabOAuthTokenResponse, type GitLabOAuthTokens, type GitLabOpenAIConfig, GitLabOpenAILanguageModel, type GitLabProject, GitLabProjectCache, GitLabProjectDetector, type GitLabProjectDetectorConfig, type GitLabProvider, type GitLabProviderSettings, type GitLabThinkingConfig, GitLabWorkflowClient, type GitLabWorkflowClientConfig, GitLabWorkflowLanguageModel, type GitLabWorkflowLanguageModelConfig, type GitLabWorkflowOptions, GitLabWorkflowTokenClient, MODEL_ID_TO_ANTHROPIC_MODEL, MODEL_MAPPINGS, type McpToolDefinition, type ModelCacheEntry, type ModelConfig, type ModelConfigRegistryOptions, type ModelDiscoveryConfig, type ModelMapping, type ModelProvider, type NewCheckpoint, OAUTH_SCOPES, OPENCODE_GITLAB_AUTH_CLIENT_ID, type OpenAIApiType, type OpenCodeAuth, type OpenCodeAuthApi, type OpenCodeAuthOAuth, type RunMcpTool, type StartRequest, TOKEN_EXPIRY_SKEW_MS, VERSION, WORKFLOW_ENVIRONMENT, WS_HEARTBEAT_INTERVAL_MS, WS_KEEPALIVE_PING_INTERVAL_MS, type WorkflowAction, type WorkflowClientEvent, type WorkflowDiscoveryConfig, type WorkflowDiscoveryOptions, type WorkflowDiscoveryResult, type WorkflowStatus, type WorkflowToolExecutor, WorkflowType, type WorkflowWebSocketOptions, createGitLab, discoverWorkflowModels, getAnthropicModelForModelId, getModelMapping, getOpenAIApiType, getOpenAIModelForModelId, getProviderForModelId, getValidModelsForProvider, getWorkflowModelRef, gitlab, gitlabOAuthTokenResponseSchema, isResponsesApiModel, isWorkflowModel, parseModelsYml };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
import { LanguageModelV3, LanguageModelV3CallOptions, LanguageModelV3GenerateResult, LanguageModelV3StreamResult, LanguageModelV3Content, LanguageModelV3FinishReason, LanguageModelV3Usage, LanguageModelV3StreamPart } from '@ai-sdk/provider';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Extended thinking configuration for Anthropic Messages API models.
|
|
6
|
+
*
|
|
7
|
+
* - `enabled`/`disabled` map to the Anthropic `thinking` field directly. `enabled`
|
|
8
|
+
* requires a `budgetTokens` value that is less than the request's max tokens.
|
|
9
|
+
* - `adaptive` is required by effort-based models (e.g. Claude Opus 4.8), which
|
|
10
|
+
* reject `thinking.type.enabled`. It is serialized as `thinking: { type: 'adaptive' }`
|
|
11
|
+
* plus a sibling `output_config: { effort }`.
|
|
12
|
+
*/
|
|
13
|
+
type GitLabThinkingConfig = {
|
|
14
|
+
type: 'disabled';
|
|
15
|
+
} | {
|
|
16
|
+
type: 'enabled';
|
|
17
|
+
budgetTokens: number;
|
|
18
|
+
} | {
|
|
19
|
+
type: 'adaptive';
|
|
20
|
+
effort: 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
21
|
+
};
|
|
4
22
|
interface GitLabAnthropicConfig {
|
|
5
23
|
provider: string;
|
|
6
24
|
instanceUrl: string;
|
|
@@ -26,6 +44,7 @@ interface GitLabAnthropicConfig {
|
|
|
26
44
|
* @default 8192
|
|
27
45
|
*/
|
|
28
46
|
maxTokens?: number;
|
|
47
|
+
thinking?: GitLabThinkingConfig;
|
|
29
48
|
/**
|
|
30
49
|
* Feature flags to pass to the GitLab API
|
|
31
50
|
* @default { DuoAgentPlatformNext: true }
|
|
@@ -108,6 +127,30 @@ declare class GitLabAnthropicLanguageModel implements LanguageModelV3 {
|
|
|
108
127
|
*/
|
|
109
128
|
private convertFinishReason;
|
|
110
129
|
private createUsage;
|
|
130
|
+
/**
|
|
131
|
+
* Translates the camelCase GitLab thinking config into the Anthropic Messages
|
|
132
|
+
* request fields. `adaptive` is required by effort-based models such as Claude
|
|
133
|
+
* Opus 4.8 and pairs `thinking: { type: 'adaptive' }` with a sibling
|
|
134
|
+
* `output_config: { effort }`; `enabled`/`disabled` map through directly.
|
|
135
|
+
*/
|
|
136
|
+
private buildThinkingParams;
|
|
137
|
+
/** Per-call thinking configuration takes precedence over the model-level default. */
|
|
138
|
+
private resolveThinkingConfig;
|
|
139
|
+
private validateThinkingConfig;
|
|
140
|
+
/**
|
|
141
|
+
* Rebuild an Anthropic thinking block from a prior-turn reasoning part.
|
|
142
|
+
* Anthropic requires thinking blocks to be replayed unmodified (with their
|
|
143
|
+
* signature) during tool-use loops; the signature / redacted payload are
|
|
144
|
+
* carried in the reasoning part's provider metadata under `gitlab`.
|
|
145
|
+
*/
|
|
146
|
+
private convertReasoningPart;
|
|
147
|
+
private isThinkingActive;
|
|
148
|
+
/**
|
|
149
|
+
* Anthropic rejects `temperature` changes while thinking is active and requires
|
|
150
|
+
* `top_p` within [0.95, 1]; drop those params when thinking is engaged so the
|
|
151
|
+
* gateway does not 400. Undefined values are omitted either way.
|
|
152
|
+
*/
|
|
153
|
+
private buildSamplingParams;
|
|
111
154
|
doGenerate(options: LanguageModelV3CallOptions): Promise<LanguageModelV3GenerateResult>;
|
|
112
155
|
private doGenerateWithRetry;
|
|
113
156
|
doStream(options: LanguageModelV3CallOptions): Promise<LanguageModelV3StreamResult>;
|
|
@@ -1009,6 +1052,16 @@ interface GitLabAgenticOptions {
|
|
|
1009
1052
|
* @default 8192
|
|
1010
1053
|
*/
|
|
1011
1054
|
maxTokens?: number;
|
|
1055
|
+
/**
|
|
1056
|
+
* Default reasoning effort for OpenAI models.
|
|
1057
|
+
* Can be overridden per call through `providerOptions.gitlab.reasoningEffort`.
|
|
1058
|
+
*/
|
|
1059
|
+
reasoningEffort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
1060
|
+
/**
|
|
1061
|
+
* Default extended thinking configuration for Anthropic Messages API models.
|
|
1062
|
+
* Can be overridden per call through `providerOptions.gitlab.thinking`.
|
|
1063
|
+
*/
|
|
1064
|
+
thinking?: GitLabThinkingConfig;
|
|
1012
1065
|
/**
|
|
1013
1066
|
* Feature flags to pass to the GitLab API
|
|
1014
1067
|
*/
|
|
@@ -1097,6 +1150,7 @@ interface GitLabOpenAIConfig {
|
|
|
1097
1150
|
refreshApiKey?: () => Promise<void>;
|
|
1098
1151
|
openaiModel?: string;
|
|
1099
1152
|
maxTokens?: number;
|
|
1153
|
+
reasoningEffort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
1100
1154
|
featureFlags?: {
|
|
1101
1155
|
DuoAgentPlatformNext: true;
|
|
1102
1156
|
} & Record<string, boolean>;
|
|
@@ -1136,6 +1190,12 @@ declare class GitLabOpenAILanguageModel implements LanguageModelV3 {
|
|
|
1136
1190
|
* a hint that the gateway may be rejecting the request due to tool count.
|
|
1137
1191
|
*/
|
|
1138
1192
|
private formatOpenAIError;
|
|
1193
|
+
/**
|
|
1194
|
+
* Per-call `providerOptions.gitlab.reasoningEffort` takes precedence over the
|
|
1195
|
+
* model-level default.
|
|
1196
|
+
*/
|
|
1197
|
+
private resolveReasoningEffort;
|
|
1198
|
+
private asOpenAIReasoningEffort;
|
|
1139
1199
|
private convertTools;
|
|
1140
1200
|
private convertToolChoice;
|
|
1141
1201
|
private convertPrompt;
|
|
@@ -1791,4 +1851,4 @@ interface WorkflowDiscoveryResult {
|
|
|
1791
1851
|
}
|
|
1792
1852
|
declare function discoverWorkflowModels(config: WorkflowDiscoveryConfig, options: WorkflowDiscoveryOptions): Promise<WorkflowDiscoveryResult>;
|
|
1793
1853
|
|
|
1794
|
-
export { AGENT_PRIVILEGES, type ActionResponsePayload, type AdditionalContext, type AiChatAvailableModels, type AiModel, type ApprovalDecision, BUNDLED_CLIENT_ID, CLIENT_VERSION, type ClientEvent, DEFAULT_AGENT_PRIVILEGES, DEFAULT_AI_GATEWAY_URL, DEFAULT_CLIENT_CAPABILITIES, DEFAULT_WORKFLOW_DEFINITION, type DirectAccessToken, type DiscoveredModels, type DiscoveredWorkflowModel, GITLAB_COM_URL, type GenerateTokenResponse, type GitLabAgenticOptions, type GitLabAnthropicConfig, GitLabAnthropicLanguageModel, GitLabDirectAccessClient, type GitLabDirectAccessConfig, GitLabError, type GitLabErrorOptions, GitLabModelCache, GitLabModelConfigRegistry, GitLabModelDiscovery, GitLabOAuthManager, type GitLabOAuthTokenResponse, type GitLabOAuthTokens, type GitLabOpenAIConfig, GitLabOpenAILanguageModel, type GitLabProject, GitLabProjectCache, GitLabProjectDetector, type GitLabProjectDetectorConfig, type GitLabProvider, type GitLabProviderSettings, GitLabWorkflowClient, type GitLabWorkflowClientConfig, GitLabWorkflowLanguageModel, type GitLabWorkflowLanguageModelConfig, type GitLabWorkflowOptions, GitLabWorkflowTokenClient, MODEL_ID_TO_ANTHROPIC_MODEL, MODEL_MAPPINGS, type McpToolDefinition, type ModelCacheEntry, type ModelConfig, type ModelConfigRegistryOptions, type ModelDiscoveryConfig, type ModelMapping, type ModelProvider, type NewCheckpoint, OAUTH_SCOPES, OPENCODE_GITLAB_AUTH_CLIENT_ID, type OpenAIApiType, type OpenCodeAuth, type OpenCodeAuthApi, type OpenCodeAuthOAuth, type RunMcpTool, type StartRequest, TOKEN_EXPIRY_SKEW_MS, VERSION, WORKFLOW_ENVIRONMENT, WS_HEARTBEAT_INTERVAL_MS, WS_KEEPALIVE_PING_INTERVAL_MS, type WorkflowAction, type WorkflowClientEvent, type WorkflowDiscoveryConfig, type WorkflowDiscoveryOptions, type WorkflowDiscoveryResult, type WorkflowStatus, type WorkflowToolExecutor, WorkflowType, type WorkflowWebSocketOptions, createGitLab, discoverWorkflowModels, getAnthropicModelForModelId, getModelMapping, getOpenAIApiType, getOpenAIModelForModelId, getProviderForModelId, getValidModelsForProvider, getWorkflowModelRef, gitlab, gitlabOAuthTokenResponseSchema, isResponsesApiModel, isWorkflowModel, parseModelsYml };
|
|
1854
|
+
export { AGENT_PRIVILEGES, type ActionResponsePayload, type AdditionalContext, type AiChatAvailableModels, type AiModel, type ApprovalDecision, BUNDLED_CLIENT_ID, CLIENT_VERSION, type ClientEvent, DEFAULT_AGENT_PRIVILEGES, DEFAULT_AI_GATEWAY_URL, DEFAULT_CLIENT_CAPABILITIES, DEFAULT_WORKFLOW_DEFINITION, type DirectAccessToken, type DiscoveredModels, type DiscoveredWorkflowModel, GITLAB_COM_URL, type GenerateTokenResponse, type GitLabAgenticOptions, type GitLabAnthropicConfig, GitLabAnthropicLanguageModel, GitLabDirectAccessClient, type GitLabDirectAccessConfig, GitLabError, type GitLabErrorOptions, GitLabModelCache, GitLabModelConfigRegistry, GitLabModelDiscovery, GitLabOAuthManager, type GitLabOAuthTokenResponse, type GitLabOAuthTokens, type GitLabOpenAIConfig, GitLabOpenAILanguageModel, type GitLabProject, GitLabProjectCache, GitLabProjectDetector, type GitLabProjectDetectorConfig, type GitLabProvider, type GitLabProviderSettings, type GitLabThinkingConfig, GitLabWorkflowClient, type GitLabWorkflowClientConfig, GitLabWorkflowLanguageModel, type GitLabWorkflowLanguageModelConfig, type GitLabWorkflowOptions, GitLabWorkflowTokenClient, MODEL_ID_TO_ANTHROPIC_MODEL, MODEL_MAPPINGS, type McpToolDefinition, type ModelCacheEntry, type ModelConfig, type ModelConfigRegistryOptions, type ModelDiscoveryConfig, type ModelMapping, type ModelProvider, type NewCheckpoint, OAUTH_SCOPES, OPENCODE_GITLAB_AUTH_CLIENT_ID, type OpenAIApiType, type OpenCodeAuth, type OpenCodeAuthApi, type OpenCodeAuthOAuth, type RunMcpTool, type StartRequest, TOKEN_EXPIRY_SKEW_MS, VERSION, WORKFLOW_ENVIRONMENT, WS_HEARTBEAT_INTERVAL_MS, WS_KEEPALIVE_PING_INTERVAL_MS, type WorkflowAction, type WorkflowClientEvent, type WorkflowDiscoveryConfig, type WorkflowDiscoveryOptions, type WorkflowDiscoveryResult, type WorkflowStatus, type WorkflowToolExecutor, WorkflowType, type WorkflowWebSocketOptions, createGitLab, discoverWorkflowModels, getAnthropicModelForModelId, getModelMapping, getOpenAIApiType, getOpenAIModelForModelId, getProviderForModelId, getValidModelsForProvider, getWorkflowModelRef, gitlab, gitlabOAuthTokenResponseSchema, isResponsesApiModel, isWorkflowModel, parseModelsYml };
|