@vybestack/llxprt-code-core 0.1.23-nightly.250829.6bacfcba → 0.1.23-nightly.250903.97906524
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/README.md +2 -2
- package/dist/src/code_assist/codeAssist.js +17 -6
- package/dist/src/code_assist/codeAssist.js.map +1 -1
- package/dist/src/code_assist/server.js +15 -4
- package/dist/src/code_assist/server.js.map +1 -1
- package/dist/src/code_assist/setup.js +7 -0
- package/dist/src/code_assist/setup.js.map +1 -1
- package/dist/src/core/ContentGeneratorAdapter.d.ts +37 -0
- package/dist/src/core/ContentGeneratorAdapter.js +58 -0
- package/dist/src/core/ContentGeneratorAdapter.js.map +1 -0
- package/dist/src/core/client.d.ts +9 -2
- package/dist/src/core/client.js +111 -36
- package/dist/src/core/client.js.map +1 -1
- package/dist/src/core/compression-config.d.ts +10 -0
- package/dist/src/core/compression-config.js +18 -0
- package/dist/src/core/compression-config.js.map +1 -0
- package/dist/src/core/geminiChat.d.ts +8 -2
- package/dist/src/core/geminiChat.js +148 -32
- package/dist/src/core/geminiChat.js.map +1 -1
- package/dist/src/core/prompts.js +4 -2
- package/dist/src/core/prompts.js.map +1 -1
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/providers/BaseProvider.d.ts +1 -1
- package/dist/src/providers/BaseProvider.js.map +1 -1
- package/dist/src/providers/anthropic/AnthropicProvider.js +1 -1
- package/dist/src/providers/anthropic/AnthropicProvider.js.map +1 -1
- package/dist/src/providers/gemini/GeminiProvider.js +100 -36
- package/dist/src/providers/gemini/GeminiProvider.js.map +1 -1
- package/dist/src/providers/openai/OpenAIProvider.d.ts +54 -25
- package/dist/src/providers/openai/OpenAIProvider.js +528 -984
- package/dist/src/providers/openai/OpenAIProvider.js.map +1 -1
- package/dist/src/providers/openai-responses/OpenAIResponsesProvider.d.ts +91 -0
- package/dist/src/providers/openai-responses/OpenAIResponsesProvider.js +440 -0
- package/dist/src/providers/openai-responses/OpenAIResponsesProvider.js.map +1 -0
- package/dist/src/providers/openai-responses/index.d.ts +1 -0
- package/dist/src/providers/openai-responses/index.js +2 -0
- package/dist/src/providers/openai-responses/index.js.map +1 -0
- package/dist/src/services/history/ContentConverters.d.ts +38 -0
- package/dist/src/services/history/ContentConverters.js +188 -0
- package/dist/src/services/history/ContentConverters.js.map +1 -0
- package/dist/src/services/history/HistoryEvents.d.ts +32 -0
- package/dist/src/services/history/HistoryEvents.js +17 -0
- package/dist/src/services/history/HistoryEvents.js.map +1 -0
- package/dist/src/services/history/HistoryService.d.ts +168 -0
- package/dist/src/services/history/HistoryService.js +521 -0
- package/dist/src/services/history/HistoryService.js.map +1 -0
- package/dist/src/services/history/IContent.d.ts +179 -0
- package/dist/src/services/history/IContent.js +104 -0
- package/dist/src/services/history/IContent.js.map +1 -0
- package/package.json +1 -1
@@ -18,7 +18,6 @@ import { ITool } from '../ITool.js';
|
|
18
18
|
import { IMessage } from '../IMessage.js';
|
19
19
|
import { ToolFormat } from '../../tools/IToolFormatter.js';
|
20
20
|
import { IProviderConfig } from '../types/IProviderConfig.js';
|
21
|
-
import { ConversationCache } from './ConversationCache.js';
|
22
21
|
import { BaseProvider } from '../BaseProvider.js';
|
23
22
|
import { OAuthManager } from '../../auth/precedence.js';
|
24
23
|
export declare class OpenAIProvider extends BaseProvider {
|
@@ -29,7 +28,6 @@ export declare class OpenAIProvider extends BaseProvider {
|
|
29
28
|
private providerConfig?;
|
30
29
|
private toolFormatter;
|
31
30
|
private toolFormatOverride?;
|
32
|
-
private conversationCache;
|
33
31
|
private modelParams?;
|
34
32
|
private _cachedClient?;
|
35
33
|
private _cachedClientKey?;
|
@@ -49,9 +47,6 @@ export declare class OpenAIProvider extends BaseProvider {
|
|
49
47
|
private updateClientWithResolvedAuth;
|
50
48
|
private requiresTextToolCallParsing;
|
51
49
|
getToolFormat(): ToolFormat;
|
52
|
-
private shouldUseResponses;
|
53
|
-
private callResponsesEndpoint;
|
54
|
-
private handleResponsesApiResponse;
|
55
50
|
getModels(): Promise<IModel[]>;
|
56
51
|
generateChatCompletion(messages: IMessage[], tools?: ITool[], _toolFormat?: string): AsyncIterableIterator<IMessage>;
|
57
52
|
setModel(modelId: string): void;
|
@@ -61,26 +56,6 @@ export declare class OpenAIProvider extends BaseProvider {
|
|
61
56
|
setBaseUrl(baseUrl?: string): void;
|
62
57
|
setConfig(config: IProviderConfig): void;
|
63
58
|
setToolFormatOverride(format: ToolFormat | null): void;
|
64
|
-
/**
|
65
|
-
* Estimates the remote context usage for the current conversation
|
66
|
-
* @param conversationId The conversation ID
|
67
|
-
* @param parentId The parent message ID
|
68
|
-
* @param promptMessages The messages being sent in the current prompt
|
69
|
-
* @returns Context usage information including remote tokens
|
70
|
-
*/
|
71
|
-
estimateContextUsage(conversationId: string | undefined, parentId: string | undefined, promptMessages: IMessage[]): {
|
72
|
-
totalTokens: number;
|
73
|
-
remoteTokens: number;
|
74
|
-
promptTokens: number;
|
75
|
-
maxTokens: number;
|
76
|
-
contextUsedPercent: number;
|
77
|
-
tokensRemaining: number;
|
78
|
-
};
|
79
|
-
/**
|
80
|
-
* Get the conversation cache instance
|
81
|
-
* @returns The conversation cache
|
82
|
-
*/
|
83
|
-
getConversationCache(): ConversationCache;
|
84
59
|
/**
|
85
60
|
* OpenAI always requires payment (API key)
|
86
61
|
*/
|
@@ -136,4 +111,58 @@ export declare class OpenAIProvider extends BaseProvider {
|
|
136
111
|
* @returns Parsed tool response
|
137
112
|
*/
|
138
113
|
parseToolResponse(response: unknown): unknown;
|
114
|
+
/**
|
115
|
+
* Validate authentication and message preconditions for API calls
|
116
|
+
*/
|
117
|
+
private validateRequestPreconditions;
|
118
|
+
/**
|
119
|
+
* Prepare API request configuration
|
120
|
+
*/
|
121
|
+
private prepareApiRequest;
|
122
|
+
/**
|
123
|
+
* Execute API call with error handling
|
124
|
+
*/
|
125
|
+
private executeApiCall;
|
126
|
+
/**
|
127
|
+
* Handle and log API errors
|
128
|
+
*/
|
129
|
+
private handleApiError;
|
130
|
+
/**
|
131
|
+
* Process non-streaming response
|
132
|
+
*/
|
133
|
+
private processNonStreamingResponse;
|
134
|
+
/**
|
135
|
+
* Process and build final response messages
|
136
|
+
*/
|
137
|
+
private processFinalResponse;
|
138
|
+
/**
|
139
|
+
* Handle Qwen-specific whitespace buffering during streaming
|
140
|
+
* @param delta The stream delta containing content
|
141
|
+
* @param pendingWhitespace Current buffered whitespace
|
142
|
+
* @param fullContent Accumulated full content
|
143
|
+
* @returns Object with updated state and whether to yield content
|
144
|
+
*/
|
145
|
+
private handleQwenStreamingWhitespace;
|
146
|
+
/**
|
147
|
+
* Process tool calls for Qwen models, fixing double stringification
|
148
|
+
* @param toolCalls The tool calls to process
|
149
|
+
* @returns Processed tool calls with fixes applied
|
150
|
+
*/
|
151
|
+
private processQwenToolCalls;
|
152
|
+
/**
|
153
|
+
* Determine how to yield the final message with tool calls based on provider quirks
|
154
|
+
* @param hasStreamedContent Whether content was already streamed
|
155
|
+
* @param fullContent The complete content
|
156
|
+
* @param toolCalls The tool calls to include
|
157
|
+
* @param usageData Optional usage statistics
|
158
|
+
* @returns The message to yield
|
159
|
+
*/
|
160
|
+
private buildFinalToolCallMessage;
|
161
|
+
/**
|
162
|
+
* Fix Qwen's double stringification of tool call arguments
|
163
|
+
* Qwen models stringify array/object values WITHIN the JSON arguments
|
164
|
+
* @param toolCall The tool call to fix
|
165
|
+
* @returns The fixed tool call or the original if no fix is needed
|
166
|
+
*/
|
167
|
+
private fixQwenDoubleStringification;
|
139
168
|
}
|