Merge branch 'main' into main

This commit is contained in:
Patrick Wozniak
2026-08-25 13:04:06 +02:00
committed by GitHub
2 changed files with 10 additions and 3 deletions
+1
View File
@@ -10,6 +10,7 @@
- Add optional zero-data-retention headers through `COMMANDCODE_ZDR=1`. - Add optional zero-data-retention headers through `COMMANDCODE_ZDR=1`.
- Refresh GPT-5.6 Terra and Luna display prices after their temporary 50% promotion ended, and display the current DeepSeek V4 off-peak rates for its time-dependent pricing. - Refresh GPT-5.6 Terra and Luna display prices after their temporary 50% promotion ended, and display the current DeepSeek V4 off-peak rates for its time-dependent pricing.
- Add isolated live E2E profiles for separate Go-plan and Provider-API credentials, including an explicit selected-transport assertion and packed-package validation. - Add isolated live E2E profiles for separate Go-plan and Provider-API credentials, including an explicit selected-transport assertion and packed-package validation.
- Fix extension load failure on newer pi hosts that reject registering a custom API under a built-in name (`openai-completions`); register under `commandcode-custom` instead and restore the real wire API before native compat dispatch.
## 0.5.1 - 2026-08-11 ## 0.5.1 - 2026-08-11
+9 -3
View File
@@ -19,6 +19,7 @@ import { getConfiguredApiKey } from "./src/api-key.ts"
import { createStreamCommandCode } from "./src/core.ts" import { createStreamCommandCode } from "./src/core.ts"
import { calculateCommandCodeCost } from "./src/cost.ts" import { calculateCommandCodeCost } from "./src/cost.ts"
import { import {
apiForModelId,
baseUrlForModel, baseUrlForModel,
DEFAULT_MODELS_URL, DEFAULT_MODELS_URL,
DEFAULT_PROVIDER_API_BASE, DEFAULT_PROVIDER_API_BASE,
@@ -51,7 +52,7 @@ function createProviderConfig(
name: "Command Code", name: "Command Code",
baseUrl: apiBase, baseUrl: apiBase,
apiKey: getConfiguredApiKey() ?? "$COMMANDCODE_API_KEY", apiKey: getConfiguredApiKey() ?? "$COMMANDCODE_API_KEY",
api: "openai-completions", api: "commandcode-custom",
streamSimple: streamCommandCode, streamSimple: streamCommandCode,
headers, headers,
oauth: { oauth: {
@@ -63,7 +64,7 @@ function createProviderConfig(
models: models.map((model) => ({ models: models.map((model) => ({
id: model.id, id: model.id,
name: model.name, name: model.name,
api: model.api, api: "commandcode-custom",
baseUrl: baseUrlForModel(apiBase, model.api), baseUrl: baseUrlForModel(apiBase, model.api),
reasoning: model.reasoning, reasoning: model.reasoning,
...(thinkingMetadataForModel(model.id) ?? {}), ...(thinkingMetadataForModel(model.id) ?? {}),
@@ -108,7 +109,12 @@ export default async function (pi: ExtensionAPI) {
}) })
const transport = createCommandCodeTransportRouter({ const transport = createCommandCodeTransportRouter({
createStream: () => new AssistantMessageEventStream(), createStream: () => new AssistantMessageEventStream(),
streamProvider: streamNativeProvider, streamProvider: (model, context, options) =>
streamNativeProvider(
{ ...model, api: apiForModelId(model.id), compat: model.compatConfig ?? model.compat },
context,
options,
),
streamGenerate, streamGenerate,
}) })