gitlab-ai-provider 6.12.2 → 6.14.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.14.0.tgz +0 -0
- package/dist/index.d.mts +61 -1
- package/dist/index.d.ts +61 -1
- package/dist/index.js +253 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +253 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/gitlab-ai-provider-6.12.2.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.14.0 (2026-09-04)
|
|
6
|
+
|
|
7
|
+
- Merge branch 'reasoning-controls' into 'main' ([7e13eb7](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/7e13eb7))
|
|
8
|
+
- feat(agentic): add configurable reasoning controls ([afb4850](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/afb4850))
|
|
9
|
+
|
|
10
|
+
## 6.13.0 (2026-09-02)
|
|
11
|
+
|
|
12
|
+
- Merge branch 'feature-add-fable-5-1' into 'main' ([4c4196b](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/4c4196b))
|
|
13
|
+
- feat(models): add Claude Fable 5.1 model mapping ([e31c530](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/e31c530))
|
|
14
|
+
|
|
5
15
|
## <small>6.12.2 (2026-08-24)</small>
|
|
6
16
|
|
|
7
17
|
- Merge branch 'fix/workflow-lock-reconnect-race' into 'main' ([51a9277](https://gitlab.com/vglafirov/gitlab-ai-provider/commit/51a9277))
|
package/README.md
CHANGED
|
@@ -121,6 +121,7 @@ const customModel = gitlab.agenticChat('duo-chat-opus-4-5', {
|
|
|
121
121
|
|
|
122
122
|
| Model ID | Provider | Backend Model |
|
|
123
123
|
| ------------------------ | --------- | ---------------------------- |
|
|
124
|
+
| `duo-chat-fable-5-1` | Anthropic | `claude-fable-5-1` |
|
|
124
125
|
| `duo-chat-fable-5` | Anthropic | `claude-fable-5` |
|
|
125
126
|
| `duo-chat-opus-5` | Anthropic | `claude-opus-5` |
|
|
126
127
|
| `duo-chat-opus-4-8` | Anthropic | `claude-opus-4-8` |
|
|
@@ -173,11 +174,32 @@ const { text: quickResponse } = await generateText({
|
|
|
173
174
|
|
|
174
175
|
// GPT-5 Codex - Optimized for code
|
|
175
176
|
const { text: codeExplanation } = await generateText({
|
|
176
|
-
model: gitlab.agenticChat('duo-chat-gpt-5-codex'
|
|
177
|
+
model: gitlab.agenticChat('duo-chat-gpt-5-codex', {
|
|
178
|
+
reasoningEffort: 'high',
|
|
179
|
+
}),
|
|
177
180
|
prompt: 'Refactor this function for better performance',
|
|
178
181
|
});
|
|
179
182
|
```
|
|
180
183
|
|
|
184
|
+
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:
|
|
185
|
+
|
|
186
|
+
```typescript
|
|
187
|
+
// budget-based thinking (e.g. Claude Sonnet 4.6)
|
|
188
|
+
const sonnet = gitlab.agenticChat('duo-chat-sonnet-4-6', {
|
|
189
|
+
thinking: { type: 'enabled', budgetTokens: 4096 },
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
// adaptive thinking (required by effort-based models such as Claude Opus 4.8,
|
|
193
|
+
// which reject `thinking.type.enabled`)
|
|
194
|
+
const opus = gitlab.agenticChat('duo-chat-opus-4-8', {
|
|
195
|
+
thinking: { type: 'adaptive', effort: 'high' },
|
|
196
|
+
});
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
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.
|
|
200
|
+
|
|
201
|
+
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.
|
|
202
|
+
|
|
181
203
|
**OpenAI Models with Tool Calling:**
|
|
182
204
|
|
|
183
205
|
```typescript
|
|
@@ -712,6 +734,11 @@ interface GitLabProviderSettings {
|
|
|
712
734
|
interface GitLabAgenticOptions {
|
|
713
735
|
providerModel?: string; // Override the backend model (e.g., 'claude-sonnet-4-5-20250929' or 'gpt-5.1-2025-11-13')
|
|
714
736
|
maxTokens?: number; // Default: 8192
|
|
737
|
+
reasoningEffort?: 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max'; // OpenAI models (Responses + Chat Completions)
|
|
738
|
+
thinking?: // Anthropic models
|
|
739
|
+
| { type: 'disabled' }
|
|
740
|
+
| { type: 'enabled'; budgetTokens: number }
|
|
741
|
+
| { type: 'adaptive'; effort: 'low' | 'medium' | 'high' | 'xhigh' | 'max' };
|
|
715
742
|
featureFlags?: Record<string, boolean>; // GitLab feature flags
|
|
716
743
|
aiGatewayHeaders?: Record<string, string>; // Custom headers for AI Gateway proxy (per-model)
|
|
717
744
|
}
|
|
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 };
|