topchester-ai 0.40.0 → 0.42.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/dist/bin.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as runTopchesterCli } from "./cli-OkgSiSXs.mjs";
2
+ import { t as runTopchesterCli } from "./cli-Bh7BCFNO.mjs";
3
3
  //#region src/bin.ts
4
4
  await runTopchesterCli();
5
5
  //#endregion
@@ -4867,6 +4867,7 @@ var ModelGateway = class ModelGateway {
4867
4867
  baseURL: providerConfig.baseURL,
4868
4868
  apiKey: resolveApiKey(providerConfig),
4869
4869
  headers: providerConfig.headers,
4870
+ includeUsage: providerConfig.includeUsage !== false,
4870
4871
  supportsStructuredOutputs: providerConfig.supportsStructuredOutputs
4871
4872
  }).chatModel(modelId),
4872
4873
  providerId,
@@ -5215,18 +5216,21 @@ function buildPromptInput(request, config) {
5215
5216
  prompt: request.prompt
5216
5217
  };
5217
5218
  const providerOptions = buildPromptCacheProviderOptions();
5218
- return { messages: [...request.system ? [{
5219
- role: "system",
5220
- content: request.system,
5221
- providerOptions
5222
- }] : [], {
5223
- role: "user",
5224
- content: [{
5225
- type: "text",
5226
- text: request.prompt,
5219
+ return {
5220
+ messages: [...request.system ? [{
5221
+ role: "system",
5222
+ content: request.system,
5227
5223
  providerOptions
5228
- }]
5229
- }] };
5224
+ }] : [], {
5225
+ role: "user",
5226
+ content: [{
5227
+ type: "text",
5228
+ text: request.prompt,
5229
+ providerOptions
5230
+ }]
5231
+ }],
5232
+ allowSystemInMessages: true
5233
+ };
5230
5234
  }
5231
5235
  function buildPromptCacheProviderOptions() {
5232
5236
  return { openaiCompatible: { cache_control: { type: "ephemeral" } } };
@@ -5362,6 +5366,7 @@ const providerSchema = z.object({
5362
5366
  headers: z.record(z.string(), z.string()).optional(),
5363
5367
  supportsStructuredOutputs: z.boolean().optional(),
5364
5368
  service_tier: z.enum(["flex", "priority"]).optional(),
5369
+ includeUsage: z.boolean().optional(),
5365
5370
  promptCaching: z.boolean().optional(),
5366
5371
  toolProtocol: toolProtocolSchema.optional(),
5367
5372
  openRouterToolRouting: z.enum([
@@ -13802,4 +13807,4 @@ function formatDryRunSyncStatus(status) {
13802
13807
  //#endregion
13803
13808
  export { runTopchesterCli as t };
13804
13809
 
13805
- //# sourceMappingURL=cli-OkgSiSXs.mjs.map
13810
+ //# sourceMappingURL=cli-Bh7BCFNO.mjs.map