@codemieai/code 0.15.7 → 0.15.8
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 +16 -0
- package/dist/agents/core/AgentCLI.d.ts +20 -0
- package/dist/agents/core/AgentCLI.d.ts.map +1 -1
- package/dist/agents/core/AgentCLI.js +104 -21
- package/dist/agents/core/AgentCLI.js.map +1 -1
- package/dist/agents/core/types.d.ts +12 -1
- package/dist/agents/core/types.d.ts.map +1 -1
- package/dist/agents/plugins/claude/claude.session.d.ts +3 -3
- package/dist/agents/plugins/claude/claude.session.d.ts.map +1 -1
- package/dist/agents/plugins/claude/claude.session.js +8 -4
- package/dist/agents/plugins/claude/claude.session.js.map +1 -1
- package/dist/agents/plugins/claude/plugin/statusline.bundle.mjs +1 -1
- package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.d.ts +6 -0
- package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.d.ts.map +1 -1
- package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.js +31 -4
- package/dist/agents/plugins/claude/session/processors/claude.conversations-processor.js.map +1 -1
- package/dist/agents/plugins/claude-code-otlp/claude-code-otlp.allowlist.d.ts +46 -0
- package/dist/agents/plugins/claude-code-otlp/claude-code-otlp.allowlist.d.ts.map +1 -0
- package/dist/agents/plugins/claude-code-otlp/claude-code-otlp.allowlist.js +165 -0
- package/dist/agents/plugins/claude-code-otlp/claude-code-otlp.allowlist.js.map +1 -0
- package/dist/agents/plugins/claude-code-otlp/claude-code-otlp.plugin.d.ts +2 -2
- package/dist/agents/plugins/claude-code-otlp/claude-code-otlp.plugin.d.ts.map +1 -1
- package/dist/agents/plugins/claude-code-otlp/claude-code-otlp.plugin.js +19 -6
- package/dist/agents/plugins/claude-code-otlp/claude-code-otlp.plugin.js.map +1 -1
- package/dist/agents/plugins/opencode/opencode-dynamic-models.d.ts.map +1 -1
- package/dist/agents/plugins/opencode/opencode-dynamic-models.js +7 -1
- package/dist/agents/plugins/opencode/opencode-dynamic-models.js.map +1 -1
- package/dist/agents/plugins/opencode/opencode-model-configs.d.ts.map +1 -1
- package/dist/agents/plugins/opencode/opencode-model-configs.js +125 -0
- package/dist/agents/plugins/opencode/opencode-model-configs.js.map +1 -1
- package/dist/agents/plugins/pi/pi.models.d.ts.map +1 -1
- package/dist/agents/plugins/pi/pi.models.js +6 -0
- package/dist/agents/plugins/pi/pi.models.js.map +1 -1
- package/dist/cli/commands/hook.d.ts.map +1 -1
- package/dist/cli/commands/hook.js +5 -4
- package/dist/cli/commands/hook.js.map +1 -1
- package/dist/cli/commands/proxy/connect-orchestrator.d.ts +4 -1
- package/dist/cli/commands/proxy/connect-orchestrator.d.ts.map +1 -1
- package/dist/cli/commands/proxy/connect-orchestrator.js +20 -5
- package/dist/cli/commands/proxy/connect-orchestrator.js.map +1 -1
- package/dist/cli/commands/proxy/connectors/claude-code-otlp.d.ts +8 -0
- package/dist/cli/commands/proxy/connectors/claude-code-otlp.d.ts.map +1 -1
- package/dist/cli/commands/proxy/connectors/claude-code-otlp.js +70 -17
- package/dist/cli/commands/proxy/connectors/claude-code-otlp.js.map +1 -1
- package/dist/cli/commands/proxy/connectors/vscode-models.d.ts.map +1 -1
- package/dist/cli/commands/proxy/connectors/vscode-models.js +45 -0
- package/dist/cli/commands/proxy/connectors/vscode-models.js.map +1 -1
- package/dist/cli/commands/proxy/disconnect-orchestrator.d.ts.map +1 -1
- package/dist/cli/commands/proxy/disconnect-orchestrator.js +10 -1
- package/dist/cli/commands/proxy/disconnect-orchestrator.js.map +1 -1
- package/dist/cli/commands/proxy/index.d.ts.map +1 -1
- package/dist/cli/commands/proxy/index.js +13 -8
- package/dist/cli/commands/proxy/index.js.map +1 -1
- package/dist/cli/commands/setup.d.ts.map +1 -1
- package/dist/cli/commands/setup.js +3 -2
- package/dist/cli/commands/setup.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/otlp-spool/completeness-gate.d.ts +14 -3
- package/dist/providers/plugins/sso/proxy/plugins/otlp-spool/completeness-gate.d.ts.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/otlp-spool/completeness-gate.js +15 -3
- package/dist/providers/plugins/sso/proxy/plugins/otlp-spool/completeness-gate.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/otlp-spool/forwarder.d.ts.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/otlp-spool/forwarder.js +26 -13
- package/dist/providers/plugins/sso/proxy/plugins/otlp-spool/forwarder.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/otlp-spool/session-status.d.ts +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/otlp-spool/session-status.d.ts.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/otlp-spool/session-status.js +6 -3
- package/dist/providers/plugins/sso/proxy/plugins/otlp-spool/session-status.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/otlp-spool/spool-config.d.ts +4 -0
- package/dist/providers/plugins/sso/proxy/plugins/otlp-spool/spool-config.d.ts.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/otlp-spool/spool-config.js +4 -0
- package/dist/providers/plugins/sso/proxy/plugins/otlp-spool/spool-config.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/otlp-spool/tick-processor.d.ts.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/otlp-spool/tick-processor.js +18 -0
- package/dist/providers/plugins/sso/proxy/plugins/otlp-spool/tick-processor.js.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/otlp.plugin.d.ts.map +1 -1
- package/dist/providers/plugins/sso/proxy/plugins/otlp.plugin.js +2 -8
- package/dist/providers/plugins/sso/proxy/plugins/otlp.plugin.js.map +1 -1
- package/dist/providers/plugins/sso/session/processors/conversations/constants.d.ts +2 -0
- package/dist/providers/plugins/sso/session/processors/conversations/constants.d.ts.map +1 -1
- package/dist/providers/plugins/sso/session/processors/conversations/constants.js +2 -0
- package/dist/providers/plugins/sso/session/processors/conversations/constants.js.map +1 -1
- package/dist/providers/plugins/sso/session/processors/conversations/payload-queue.d.ts +36 -0
- package/dist/providers/plugins/sso/session/processors/conversations/payload-queue.d.ts.map +1 -0
- package/dist/providers/plugins/sso/session/processors/conversations/payload-queue.js +103 -0
- package/dist/providers/plugins/sso/session/processors/conversations/payload-queue.js.map +1 -0
- package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.d.ts.map +1 -1
- package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.js +86 -68
- package/dist/providers/plugins/sso/session/processors/conversations/syncProcessor.js.map +1 -1
- package/dist/providers/plugins/sso/session/processors/conversations/types.d.ts +3 -1
- package/dist/providers/plugins/sso/session/processors/conversations/types.d.ts.map +1 -1
- package/dist/providers/plugins/sso/session/processors/conversations/types.js +3 -1
- package/dist/providers/plugins/sso/session/processors/conversations/types.js.map +1 -1
- package/dist/providers/plugins/sso/sso.models.d.ts +5 -1
- package/dist/providers/plugins/sso/sso.models.d.ts.map +1 -1
- package/dist/providers/plugins/sso/sso.models.js +23 -19
- package/dist/providers/plugins/sso/sso.models.js.map +1 -1
- package/dist/providers/plugins/sso/sso.setup-steps.d.ts.map +1 -1
- package/dist/providers/plugins/sso/sso.setup-steps.js +7 -2
- package/dist/providers/plugins/sso/sso.setup-steps.js.map +1 -1
- package/dist/utils/pricing.json +9 -1
- package/package.json +1 -1
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import { shouldStopSync } from '../../../../../../agents/core/session/BaseProcessor.js';
|
|
14
14
|
import { CONVERSATION_SYNC_STATUS } from './types.js';
|
|
15
|
+
import { collapseSupersededPayloads, getPayloadId, healSyncedDuplicates, isSendCandidate } from './payload-queue.js';
|
|
15
16
|
import { logger } from '../../../../../../utils/logger.js';
|
|
16
17
|
import { createApiClient as createConversationApiClient } from './apiClient.js';
|
|
17
18
|
import { getSessionConversationPath } from '../../../../../../agents/core/session/session-config.js';
|
|
18
19
|
import { readJSONL } from '../../utils/jsonl-reader.js';
|
|
19
20
|
import { writeJSONLAtomic } from '../../utils/jsonl-writer.js';
|
|
20
|
-
import { DEFAULT_API_TIMEOUT_MS, DEFAULT_RETRY_ATTEMPTS, CODEMIE_ASSISTANT_ID, DEFAULT_CONVERSATION_FOLDER, CONVERSATION_PROCESSOR_PRIORITY, CONVERSATION_PROCESSOR_NAME } from './constants.js';
|
|
21
|
-
const MAX_CONVERSATION_SYNC_ATTEMPTS = 3;
|
|
21
|
+
import { DEFAULT_API_TIMEOUT_MS, DEFAULT_RETRY_ATTEMPTS, CODEMIE_ASSISTANT_ID, DEFAULT_CONVERSATION_FOLDER, CONVERSATION_PROCESSOR_PRIORITY, CONVERSATION_PROCESSOR_NAME, MAX_CONVERSATION_PAYLOADS_PER_RUN } from './constants.js';
|
|
22
22
|
/**
|
|
23
23
|
* Create a conversation sync processor instance
|
|
24
24
|
* @returns SessionProcessor instance
|
|
@@ -42,9 +42,7 @@ export function createSyncProcessor() {
|
|
|
42
42
|
// Read conversation payloads from JSONL
|
|
43
43
|
const conversationsFile = getSessionConversationPath(session.sessionId);
|
|
44
44
|
const allPayloads = await readJSONL(conversationsFile);
|
|
45
|
-
const pendingPayloads = allPayloads
|
|
46
|
-
(p.status === CONVERSATION_SYNC_STATUS.FAILED &&
|
|
47
|
-
(p.syncAttempts ?? 0) < MAX_CONVERSATION_SYNC_ATTEMPTS));
|
|
45
|
+
const pendingPayloads = await prepareSendList(allPayloads, conversationsFile, context);
|
|
48
46
|
if (pendingPayloads.length === 0) {
|
|
49
47
|
logger.debug(`[${CONVERSATION_PROCESSOR_NAME}] No pending conversation payloads for session ${session.sessionId}`);
|
|
50
48
|
return { success: true, message: 'No pending payloads' };
|
|
@@ -65,6 +63,8 @@ export function createSyncProcessor() {
|
|
|
65
63
|
let successCount = 0;
|
|
66
64
|
let totalMessages = 0;
|
|
67
65
|
let deferred = false;
|
|
66
|
+
let consumedCount = 0;
|
|
67
|
+
let lastSentConversationId;
|
|
68
68
|
const successfulPayloadIds = new Set();
|
|
69
69
|
const failedByPayloadId = new Map();
|
|
70
70
|
for (const pendingPayload of pendingPayloads) {
|
|
@@ -75,7 +75,13 @@ export function createSyncProcessor() {
|
|
|
75
75
|
deferred = true;
|
|
76
76
|
break;
|
|
77
77
|
}
|
|
78
|
+
consumedCount++;
|
|
78
79
|
const payloadId = getPayloadId(pendingPayload);
|
|
80
|
+
// Each payloadId is sent at most once per run: its outcome was already
|
|
81
|
+
// applied to every record sharing the id.
|
|
82
|
+
if (successfulPayloadIds.has(payloadId) || failedByPayloadId.has(payloadId)) {
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
79
85
|
const { conversationId, history, assistantId, folder, llmModel } = pendingPayload.payload;
|
|
80
86
|
const resolvedAssistantId = assistantId || CODEMIE_ASSISTANT_ID;
|
|
81
87
|
const resolvedFolder = folder || resolveConversationFolder(context.clientType, session.agentName);
|
|
@@ -95,6 +101,7 @@ export function createSyncProcessor() {
|
|
|
95
101
|
successCount++;
|
|
96
102
|
totalMessages += history.length;
|
|
97
103
|
successfulPayloadIds.add(payloadId);
|
|
104
|
+
lastSentConversationId = conversationId;
|
|
98
105
|
}
|
|
99
106
|
}
|
|
100
107
|
catch (error) {
|
|
@@ -116,8 +123,7 @@ export function createSyncProcessor() {
|
|
|
116
123
|
}
|
|
117
124
|
}
|
|
118
125
|
const syncedAt = Date.now();
|
|
119
|
-
const
|
|
120
|
-
const remainingCount = pendingPayloads.length - attemptedCount;
|
|
126
|
+
const remainingCount = pendingPayloads.length - consumedCount;
|
|
121
127
|
const message = deferred
|
|
122
128
|
? `Sync deferred: ${remainingCount} items remaining (deadline/abort)`
|
|
123
129
|
: `Synced ${successCount}/${pendingPayloads.length} conversations`;
|
|
@@ -127,33 +133,16 @@ export function createSyncProcessor() {
|
|
|
127
133
|
else {
|
|
128
134
|
logger.info(`[${CONVERSATION_PROCESSOR_NAME}] Successfully synced ${successCount}/${pendingPayloads.length} conversations (${totalMessages} messages)`);
|
|
129
135
|
}
|
|
130
|
-
// Calculate sync updates for the adapter to persist
|
|
136
|
+
// Calculate sync updates for the adapter to persist. lastSyncedMessageUuid is
|
|
137
|
+
// deliberately not reported: each transform processor owns its own pointer, and
|
|
138
|
+
// rewriting it here from the latest *successful* payload rewound it past turns
|
|
139
|
+
// that were queued but not yet synced, re-queueing them as duplicates.
|
|
131
140
|
let maxHistoryIndex = -1;
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
if (!successfulPayloadIds.has(getPayloadId(payload)))
|
|
138
|
-
continue;
|
|
139
|
-
const historyIndices = payload.historyIndices || [];
|
|
140
|
-
const payloadMaxIndex = historyIndices.length > 0
|
|
141
|
-
? Math.max(...historyIndices)
|
|
142
|
-
: -1;
|
|
143
|
-
const payloadRank = Math.max(payloadMaxIndex, parseSourceIndex(payload.lastProcessedMessageUuid));
|
|
144
|
-
const latestRank = latestPayload
|
|
145
|
-
? Math.max(latestPayload.historyIndices.length > 0 ? Math.max(...latestPayload.historyIndices) : -1, parseSourceIndex(latestPayload.lastProcessedMessageUuid))
|
|
146
|
-
: -1;
|
|
147
|
-
if (!latestPayload || payloadRank > latestRank) {
|
|
148
|
-
latestPayload = payload;
|
|
149
|
-
}
|
|
150
|
-
if (historyIndices.length > 0) {
|
|
151
|
-
maxHistoryIndex = Math.max(maxHistoryIndex, payloadMaxIndex);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
if (latestPayload) {
|
|
155
|
-
conversationId = latestPayload.payload.conversationId;
|
|
156
|
-
lastSyncedMessageUuid = latestPayload.lastProcessedMessageUuid;
|
|
141
|
+
for (const payload of pendingPayloads) {
|
|
142
|
+
if (!successfulPayloadIds.has(getPayloadId(payload)))
|
|
143
|
+
continue;
|
|
144
|
+
for (const historyIndex of payload.historyIndices || []) {
|
|
145
|
+
maxHistoryIndex = Math.max(maxHistoryIndex, historyIndex);
|
|
157
146
|
}
|
|
158
147
|
}
|
|
159
148
|
// Debug: Log which payloads were marked as synced
|
|
@@ -175,9 +164,8 @@ export function createSyncProcessor() {
|
|
|
175
164
|
payloadsSynced: successCount,
|
|
176
165
|
syncUpdates: successCount > 0 ? {
|
|
177
166
|
conversations: {
|
|
178
|
-
lastSyncedMessageUuid,
|
|
179
167
|
lastSyncedHistoryIndex: maxHistoryIndex,
|
|
180
|
-
conversationId,
|
|
168
|
+
conversationId: lastSentConversationId,
|
|
181
169
|
totalMessagesSynced: totalMessages,
|
|
182
170
|
totalSyncAttempts: 1,
|
|
183
171
|
lastSyncAt: syncedAt
|
|
@@ -231,44 +219,74 @@ function resolveConversationFolder(clientType, agentName) {
|
|
|
231
219
|
}
|
|
232
220
|
return DEFAULT_CONVERSATION_FOLDER;
|
|
233
221
|
}
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
222
|
+
/**
|
|
223
|
+
* Prepare the queue for sending: heal → collapse → persist → cap.
|
|
224
|
+
* Mutates `allPayloads` in place and persists healed/superseded statuses before
|
|
225
|
+
* anything is sent, so even a run that defers immediately keeps them.
|
|
226
|
+
*
|
|
227
|
+
* The per-run cap applies only to unbounded runs (proxy timer, onProxyStop). A
|
|
228
|
+
* deadline-bounded run (SessionEnd) has no next run — its queue is renamed to
|
|
229
|
+
* `completed_` right after — so it defers only on the deadline.
|
|
230
|
+
*
|
|
231
|
+
* @returns the payloads to send this run, in queue order
|
|
232
|
+
*/
|
|
233
|
+
async function prepareSendList(allPayloads, conversationsFile, context) {
|
|
234
|
+
// Heal: a candidate whose payloadId already has a success record was synced.
|
|
235
|
+
const healedCount = healSyncedDuplicates(allPayloads);
|
|
236
|
+
// Collapse: an older candidate whose every entry a newer candidate re-sends is
|
|
237
|
+
// superseded (terminal, never sent). Candidates share object identity with
|
|
238
|
+
// allPayloads, so the in-place status change is what gets persisted.
|
|
239
|
+
const sendCandidates = allPayloads.filter(isSendCandidate);
|
|
240
|
+
const supersededCount = collapseSupersededPayloads(sendCandidates);
|
|
241
|
+
if (healedCount > 0 || supersededCount > 0) {
|
|
242
|
+
logger.debug(`[${CONVERSATION_PROCESSOR_NAME}] Healed ${healedCount} already-synced and superseded ` +
|
|
243
|
+
`${supersededCount} fully covered payload(s)`);
|
|
244
|
+
try {
|
|
245
|
+
await writeJSONLAtomic(conversationsFile, allPayloads);
|
|
246
|
+
}
|
|
247
|
+
catch (writeError) {
|
|
248
|
+
logger.error(`[${CONVERSATION_PROCESSOR_NAME}] Failed to persist healed/superseded payloads:`, writeError);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
const unsentPayloads = sendCandidates.filter(p => p.status !== CONVERSATION_SYNC_STATUS.SUPERSEDED);
|
|
252
|
+
if (context.syncDeadlineMs !== undefined || unsentPayloads.length <= MAX_CONVERSATION_PAYLOADS_PER_RUN) {
|
|
253
|
+
return unsentPayloads;
|
|
254
|
+
}
|
|
255
|
+
// Cap: send oldest first, at most MAX_CONVERSATION_PAYLOADS_PER_RUN; the rest wait as they are.
|
|
256
|
+
logger.debug(`[${CONVERSATION_PROCESSOR_NAME}] Per-run cap reached: deferring ` +
|
|
257
|
+
`${unsentPayloads.length - MAX_CONVERSATION_PAYLOADS_PER_RUN} payload(s) to the next run`);
|
|
258
|
+
return unsentPayloads.slice(0, MAX_CONVERSATION_PAYLOADS_PER_RUN);
|
|
238
259
|
}
|
|
239
260
|
/**
|
|
240
|
-
* Apply a
|
|
241
|
-
*
|
|
242
|
-
*
|
|
261
|
+
* Apply a payload's sync outcome to the in-memory records (in place).
|
|
262
|
+
* Every not-yet-terminal (pending/failed) record sharing the sent payloadId gets
|
|
263
|
+
* the outcome, so a duplicate of the sent turn is never left pending and re-sent.
|
|
264
|
+
* The file can then be rewritten after every payload instead of only at the end.
|
|
243
265
|
*/
|
|
244
266
|
function applyPayloadOutcome(allPayloads, payloadId, syncError) {
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
? {
|
|
252
|
-
...p,
|
|
253
|
-
status: CONVERSATION_SYNC_STATUS.FAILED,
|
|
254
|
-
syncAttempts: (p.syncAttempts ?? 0) + 1,
|
|
255
|
-
error: syncError,
|
|
267
|
+
allPayloads.forEach((p, index) => {
|
|
268
|
+
if (getPayloadId(p) !== payloadId) {
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
if (p.status !== CONVERSATION_SYNC_STATUS.PENDING && p.status !== CONVERSATION_SYNC_STATUS.FAILED) {
|
|
272
|
+
return;
|
|
256
273
|
}
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
syncedCount: p.payload.history.length
|
|
274
|
+
allPayloads[index] = syncError
|
|
275
|
+
? {
|
|
276
|
+
...p,
|
|
277
|
+
status: CONVERSATION_SYNC_STATUS.FAILED,
|
|
278
|
+
syncAttempts: (p.syncAttempts ?? 0) + 1,
|
|
279
|
+
error: syncError,
|
|
264
280
|
}
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
281
|
+
: {
|
|
282
|
+
...p,
|
|
283
|
+
status: CONVERSATION_SYNC_STATUS.SUCCESS,
|
|
284
|
+
syncAttempts: (p.syncAttempts ?? 0) + 1,
|
|
285
|
+
error: undefined,
|
|
286
|
+
response: {
|
|
287
|
+
syncedCount: p.payload.history.length
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
});
|
|
273
291
|
}
|
|
274
292
|
//# sourceMappingURL=syncProcessor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"syncProcessor.js","sourceRoot":"","sources":["../../../../../../../src/providers/plugins/sso/session/processors/conversations/syncProcessor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAGxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,eAAe,IAAI,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,2BAA2B,EAC3B,+BAA+B,EAC/B,2BAA2B,
|
|
1
|
+
{"version":3,"file":"syncProcessor.js","sourceRoot":"","sources":["../../../../../../../src/providers/plugins/sso/session/processors/conversations/syncProcessor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAGxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EACL,0BAA0B,EAC1B,YAAY,EACZ,oBAAoB,EACpB,eAAe,EAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,eAAe,IAAI,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAChF,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,EACpB,2BAA2B,EAC3B,+BAA+B,EAC/B,2BAA2B,EAC3B,iCAAiC,EAClC,MAAM,gBAAgB,CAAC;AAExB;;;GAGG;AACH,MAAM,UAAU,mBAAmB;IACjC,0BAA0B;IAC1B,IAAI,SAAS,GAAG,KAAK,CAAC,CAAC,oBAA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,CAAC;AACpE,CAAC;AAED;;;;;GAKG;AACH,SAAS,mBAAmB,CAC1B,WAAwC,EACxC,SAAiB,EACjB,SAA6B;IAE7B,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE;QAC/B,IAAI,YAAY,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC;YAClC,OAAO;QACT,CAAC;QACD,IAAI,CAAC,CAAC,MAAM,KAAK,wBAAwB,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM,KAAK,wBAAwB,CAAC,MAAM,EAAE,CAAC;YAClG,OAAO;QACT,CAAC;QAED,WAAW,CAAC,KAAK,CAAC,GAAG,SAAS;YAC5B,CAAC,CAAC;gBACA,GAAG,CAAC;gBACJ,MAAM,EAAE,wBAAwB,CAAC,MAAM;gBACvC,YAAY,EAAE,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,CAAC,GAAG,CAAC;gBACvC,KAAK,EAAE,SAAS;aACjB;YACD,CAAC,CAAC;gBACA,GAAG,CAAC;gBACJ,MAAM,EAAE,wBAAwB,CAAC,OAAO;gBACxC,YAAY,EAAE,CAAC,CAAC,CAAC,YAAY,IAAI,CAAC,CAAC,GAAG,CAAC;gBACvC,KAAK,EAAE,SAAS;gBAChB,QAAQ,EAAE;oBACR,WAAW,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM;iBACtC;aACF,CAAC;IACN,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -10,11 +10,13 @@ export declare const CONVERSATION_SYNC_STATUS: {
|
|
|
10
10
|
readonly PENDING: "pending";
|
|
11
11
|
readonly SUCCESS: "success";
|
|
12
12
|
readonly FAILED: "failed";
|
|
13
|
+
/** Terminal: every entry is also carried by a newer queued record, so it is never sent */
|
|
14
|
+
readonly SUPERSEDED: "superseded";
|
|
13
15
|
};
|
|
14
16
|
/**
|
|
15
17
|
* Conversation sync status type
|
|
16
18
|
*/
|
|
17
|
-
export type ConversationSyncStatus = 'pending' | 'success' | 'failed';
|
|
19
|
+
export type ConversationSyncStatus = 'pending' | 'success' | 'failed' | 'superseded';
|
|
18
20
|
/**
|
|
19
21
|
* Conversation payload record stored in JSONL
|
|
20
22
|
* Used for tracking conversation sync status
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/providers/plugins/sso/session/processors/conversations/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/providers/plugins/sso/session/processors/conversations/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;IAInC,0FAA0F;;CAElF,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,YAAY,CAAC;AAErF;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,wCAAwC;IACxC,SAAS,EAAE,MAAM,CAAC;IAElB,2CAA2C;IAC3C,kBAAkB,EAAE,OAAO,CAAC;IAE5B,mCAAmC;IACnC,cAAc,EAAE,MAAM,EAAE,CAAC;IAEzB,oCAAoC;IACpC,YAAY,EAAE,MAAM,CAAC;IAErB,gFAAgF;IAChF,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAElC,oCAAoC;IACpC,OAAO,EAAE;QACP,cAAc,EAAE,MAAM,CAAC;QACvB,OAAO,EAAE,GAAG,EAAE,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;IAEF,yBAAyB;IACzB,MAAM,EAAE,sBAAsB,CAAC;IAE/B,oD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|
|
13
|
+
/** Terminal: every entry is also carried by a newer queued record, so it is never sent */
|
|
14
|
+
SUPERSEDED: 'superseded'
|
|
13
15
|
};
|
|
14
16
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../src/providers/plugins/sso/session/processors/conversations/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../../src/providers/plugins/sso/session/processors/conversations/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,0FAA0F;IAC1F,UAAU,EAAE,YAAY;CAChB,CAAC"}
|
|
@@ -39,7 +39,11 @@ export declare class SSOModelProxy extends BaseModelProxy {
|
|
|
39
39
|
/**
|
|
40
40
|
* Fetch models for setup wizard
|
|
41
41
|
*
|
|
42
|
-
* Returns models from CodeMie SSO API
|
|
42
|
+
* Returns models from CodeMie SSO API. When the setup wizard already holds
|
|
43
|
+
* cookies from the just-completed browser auth (see sso.setup-steps.ts
|
|
44
|
+
* getCredentials()), those are used directly instead of re-resolving
|
|
45
|
+
* credentials from disk/keychain, avoiding a race with the credential
|
|
46
|
+
* store write and reusing the same authenticated session.
|
|
43
47
|
*/
|
|
44
48
|
fetchModels(config: CodeMieConfigOptions): Promise<ModelInfo[]>;
|
|
45
49
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sso.models.d.ts","sourceRoot":"","sources":["../../../../src/providers/plugins/sso/sso.models.ts"],"names":[],"mappings":"AAAA;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oB,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IA6BrE;;;;;;OAMG;IACG,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC;IA+ChG;;;;;;;;;OASG;YACW,kBAAkB;CAyBjC"}
|
|
@@ -64,30 +64,34 @@ export class SSOModelProxy extends BaseModelProxy {
|
|
|
64
64
|
/**
|
|
65
65
|
* Fetch models for setup wizard
|
|
66
66
|
*
|
|
67
|
-
* Returns models from CodeMie SSO API
|
|
67
|
+
* Returns models from CodeMie SSO API. When the setup wizard already holds
|
|
68
|
+
* cookies from the just-completed browser auth (see sso.setup-steps.ts
|
|
69
|
+
* getCredentials()), those are used directly instead of re-resolving
|
|
70
|
+
* credentials from disk/keychain, avoiding a race with the credential
|
|
71
|
+
* store write and reusing the same authenticated session.
|
|
68
72
|
*/
|
|
69
73
|
async fetchModels(config) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
return [];
|
|
78
|
-
}
|
|
79
|
-
// Use API URL from credentials or config
|
|
80
|
-
const apiUrl = credentials.apiUrl || config.codeMieUrl;
|
|
81
|
-
if (!apiUrl) {
|
|
82
|
-
throw new Error('No CodeMie URL configured');
|
|
83
|
-
}
|
|
84
|
-
return await this.fetchModelsFromAPI(apiUrl, credentials.cookies);
|
|
74
|
+
const suppliedCookies = config.cookies;
|
|
75
|
+
// Supplied cookies come with the auth result's API URL (config.baseUrl);
|
|
76
|
+
// codeMieUrl is the org/frontend URL and serves HTML, not the API.
|
|
77
|
+
if (suppliedCookies && config.baseUrl) {
|
|
78
|
+
// Real API/network errors propagate so setup.js can show an actionable
|
|
79
|
+
// message instead of silently reporting "Found 0 available models".
|
|
80
|
+
return await this.fetchModelsFromAPI(config.baseUrl, suppliedCookies);
|
|
85
81
|
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
82
|
+
const lookupUrl = config.codeMieUrl || config.baseUrl;
|
|
83
|
+
const credentials = await this.sso.getStoredCredentials(lookupUrl);
|
|
84
|
+
if (!credentials) {
|
|
85
|
+
// Genuinely no credentials yet - setup wizard will handle auth.
|
|
86
|
+
logger.debug('No SSO credentials found, returning empty model list');
|
|
89
87
|
return [];
|
|
90
88
|
}
|
|
89
|
+
// Use API URL from credentials or config
|
|
90
|
+
const apiUrl = credentials.apiUrl || config.codeMieUrl;
|
|
91
|
+
if (!apiUrl) {
|
|
92
|
+
throw new Error('No CodeMie URL configured');
|
|
93
|
+
}
|
|
94
|
+
return await this.fetchModelsFromAPI(apiUrl, credentials.cookies);
|
|
91
95
|
}
|
|
92
96
|
/**
|
|
93
97
|
* Fetch LiteLLM integrations filtered by project (optional)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sso.models.js","sourceRoot":"","sources":["../../../../src/providers/plugins/sso/sso.models.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC1G,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD;;;;GAIG;AACH,MAAM,OAAO,aAAc,SAAQ,cAAc;IACvC,GAAG,CAAa;IAExB,YAAY,OAAgB;QAC1B,+DAA+D;QAC/D,KAAK,CAAC,OAAO,IAAI,EAAE,EAAE,KAAK,CAAC,CAAC;QAC5B,IAAI,CAAC,GAAG,GAAG,IAAI,UAAU,EAAE,CAAC;IAC9B,CAAC;IAED;;OAEG;IACH,QAAQ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qBAAqB,CAAC;AAc7B;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"sso.setup-steps.d.ts","sourceRoot":"","sources":["../../../../src/providers/plugins/sso/sso.setup-steps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,KAAK,EACV,kBAAkB,EAInB,MAAM,qBAAqB,CAAC;AAc7B;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,kBA8R3B,CAAC"}
|
|
@@ -116,7 +116,11 @@ export const SSOSetupSteps = {
|
|
|
116
116
|
codeMieProject: selectedProject,
|
|
117
117
|
userEmail: selectedUserEmail,
|
|
118
118
|
codeMieIntegration: integrationInfo,
|
|
119
|
-
apiUrl: authResult.apiUrl
|
|
119
|
+
apiUrl: authResult.apiUrl,
|
|
120
|
+
// Reused by fetchModels() below so it hits the API with the same
|
|
121
|
+
// authenticated session instead of re-resolving credentials from
|
|
122
|
+
// storage (which can race with the credential store write on Windows).
|
|
123
|
+
cookies: authResult.cookies
|
|
120
124
|
}
|
|
121
125
|
};
|
|
122
126
|
},
|
|
@@ -129,7 +133,8 @@ export const SSOSetupSteps = {
|
|
|
129
133
|
const modelProxy = new SSOModelProxy(credentials.baseUrl);
|
|
130
134
|
const models = await modelProxy.fetchModels({
|
|
131
135
|
codeMieUrl: credentials.additionalConfig?.codeMieUrl,
|
|
132
|
-
baseUrl: credentials.baseUrl
|
|
136
|
+
baseUrl: credentials.baseUrl,
|
|
137
|
+
cookies: credentials.additionalConfig?.cookies
|
|
133
138
|
});
|
|
134
139
|
return models.map(m => m.id);
|
|
135
140
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sso.setup-steps.js","sourceRoot":"","sources":["../../../../src/providers/plugins/sso/sso.setup-steps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO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,OAAO,GAAG,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,OAAO,CAAC;YACpD,MAAM,GAAG,GAAG,IAAI,UAAU,EAAE,CAAC;YAC7B,MAAM,WAAW,GAAG,MAAM,GAAG,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;YAE5D,IAAI,CAAC,WAAW,EAAE,CAAC;gBACjB,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC;YAClC,CAAC;YAED,OAAO;gBACL,aAAa,EAAE,IAAI;gBACnB,SAAS,EAAE,WAAW,CAAC,SAAS;gBAChC,MAAM,EAAE,WAAW,CAAC,MAAM;aAC3B,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;YAClD,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC;QAClC,CAAC;IACH,CAAC;CACF,CAAC;AAEF,4BAA4B;AAC5B,gBAAgB,CAAC,kBAAkB,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC"}
|
package/dist/utils/pricing.json
CHANGED
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
"keys": "All keys use dashes instead of dots (e.g. gpt-5-4 not gpt-5.4) so normalizeModelName dots→dashes works",
|
|
17
17
|
"cacheRead": "cache hit price (Anthropic: 0.1x input, OpenAI: varies, Google: ~0.1x input)",
|
|
18
18
|
"cacheWrite": "cache write price (Anthropic: 1.25x input, OpenAI: ~same as input)",
|
|
19
|
+
"gpt61Sol": "Row added 2026-10-05: gpt-6-1-sol short-context Standard $2.00/$0.10/$2.50/$10.00 verified against https://developers.openai.com/api/docs/pricing?latest-pricing=standard (Standard pricing table, row 'gpt-6.1-sol'). Dashed key per this file's convention; dotted ids normalize via normalizeModelName.",
|
|
20
|
+
"astraCacheWriteFix": "Corrected 2026-10-05: gpt-6-astra cacheWrite 10 -> 12.5 per the same vendor Standard table (row 'gpt-6-astra': $10.00/$1.00/$12.50/$50.00); 10 was a mirrored-input error, real price is ~1.25x input.",
|
|
19
21
|
"claude5": "Sonnet 5 and Opus 5 standard API-equivalent token rates verified 2026-09-15; Fable 5/5.1, Mythos 5/5.1 and Opus 4.7/4.8 verified 2026-09-27 at https://platform.claude.com/docs/en/about-claude/pricing; excludes additional tool charges. Sonnet 5's planned September 1 price increase was cancelled.",
|
|
20
22
|
"t10CatalogReconciliation": "Rows added 2026-09-26 to price catalog ids that resolvePrice() found unpriced (unify-analytics-cost-command T10), each verified against one official vendor page/API on that date. claude-opus-5-5: $4/$20 base, $5/$8 5m/1h cache write, $0.20 cache read (0.05x multiplier), bedrockRegionalMultiplier 1.1 (Opus 4.5+ scope) — https://platform.claude.com/docs/en/about-claude/pricing (Model pricing table row 'Claude Opus 5.5'). gpt-5-5: short-context Standard row '$5.00 | $0.50 | - | $30.00' — https://developers.openai.com/api/docs/pricing ('Standard Pricing Tables', row 'gpt-5.5 (<272K context length)'); cache-write column is '-' (not stated) so cacheWrite mirrors input, matching this table's existing gpt-5-4 handling. gpt-5-6-luna/-sol/-terra and gpt-6-luna/-sol: short-context Standard rows from the same OpenAI page/table, e.g. 'gpt-6-sol | $2.00 | $0.20 | $2.50 | $10.00'; these rows do state a real cache-write price (~1.25x input) so it is recorded as-is rather than mirrored. deepseek-v4-pro: peak (weekday 01:00-04:00/06:00-10:00 UTC) cache-miss input $1.32, cache-hit input $0.044, output $3.96 — https://api-docs.deepseek.com/quick_start/pricing/; off-peak (all other hours, including weekends) is exactly half: $0.66/$0.022/$1.98; peak chosen as the flat row like every other entry in this table, no time-of-day tiering supported by the schema; cacheWrite mirrors input per this table's deepseek-chat/deepseek-reasoner precedent. gemini-3-6-flash/gemini-3-8-flash: paid-tier Standard pricing 'through Dec 31, 2026' — $0.75 input/$3.75 output/$0.075 context-caching — https://ai.google.dev/gemini-api/docs/pricing; scheduled to double to $1.50/$7.50/$0.15 on 2027-01-01, not yet in effect as of verification; cacheWrite mirrors input per this table's gemini-3-5-flash/gemini-3-7-flash precedent. gemini-3-1-flash-image: Standard pricing 'Input: $0.50 (text/image); Output: $3 (text/thinking), $60.00 (images)' — https://ai.google.dev/gemini-api/docs/pricing; output field records the $60 image-generation rate (not the $3 text/thinking rate), matching this table's existing gemini-3-1-flash-image-preview/gemini-2-5-flash-image rows, which use the same convention (schema has no separate image-output field); cacheRead/cacheWrite 0 (no cache pricing published for this model). grok-4-6: base tier (<200k prompt tokens) row 'grok-4.6 (< 200k prompt tokens) | 500k | $2.00 | $0.50 | $6.00' — https://docs.x.ai/developers/models; xAI doubles every rate for prompts >=200k tokens, not represented here (schema is flat), so this is the base/short-context tier, consistent with this table's other short-context-only entries; cacheWrite mirrors input per this table's grok-4/grok-4-1-fast precedent. qwen3-coder-30b-a3b-v1 and qwen3-coder-480b-a35b-v1: AWS Bedrock on-demand Standard tier, US East (N. Virginia) — official AWS Price List API https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonBedrock/20260926004940/us-east-1/index.json (also rendered at https://aws.amazon.com/bedrock/pricing/), SKU usagetype 'qwen.qwen3-coder-30b-a3b-instruct-mantle-{input,output}-tokens-standard' = $0.00015/$0.0006 per 1K tokens ($0.15/$0.60 per 1M) and 'qwen.qwen3-coder-480b-a35b-instruct-mantle-{input,output}-tokens-standard' = $0.00045/$0.0018 per 1K tokens ($0.45/$1.80 per 1M); no cache pricing published for either. Checked but NOT added (no official page states a price for the exact catalog id): claude-4-5-sonnet / claude-4-5-sonnet-vertex now resolve via the T1 reorder fallback onto the existing claude-sonnet-4-5 row, so no new row was needed."
|
|
21
23
|
},
|
|
@@ -241,7 +243,7 @@
|
|
|
241
243
|
"input": 10,
|
|
242
244
|
"output": 50,
|
|
243
245
|
"cacheRead": 1,
|
|
244
|
-
"cacheWrite":
|
|
246
|
+
"cacheWrite": 12.5
|
|
245
247
|
},
|
|
246
248
|
"gpt-5-5-pro": {
|
|
247
249
|
"input": 30,
|
|
@@ -267,6 +269,12 @@
|
|
|
267
269
|
"cacheRead": 0.2,
|
|
268
270
|
"cacheWrite": 2.5
|
|
269
271
|
},
|
|
272
|
+
"gpt-6-1-sol": {
|
|
273
|
+
"input": 2,
|
|
274
|
+
"output": 10,
|
|
275
|
+
"cacheRead": 0.1,
|
|
276
|
+
"cacheWrite": 2.5
|
|
277
|
+
},
|
|
270
278
|
"gpt-5-2": {
|
|
271
279
|
"input": 1.75,
|
|
272
280
|
"output": 14,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codemieai/code",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.8",
|
|
4
4
|
"description": "Unified AI coding assistant CLI - Manage Claude Code, Gemini & custom agents. Multi-provider support (OpenAI, Azure, LiteLLM, SSO). Built-in LangGraph agent with file operations & git integration.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|