Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions assets/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@
"description": "Whether to use tool call middleware",
"type": "boolean"
},
"useReasoningMiddleware": {
"description": "Whether to use reasoning middleware, which extracts reasoning wrapped in <think> tags from the model output",
"type": "boolean"
},
"contentType": {
"description": "The supported mime types model can handle",
"type": "array",
Expand Down Expand Up @@ -145,6 +149,10 @@
"description": "Whether to use tool call middleware",
"type": "boolean"
},
"useReasoningMiddleware": {
"description": "Whether to use reasoning middleware, which extracts reasoning wrapped in <think> tags from the model output",
"type": "boolean"
},
"contentType": {
"description": "The supported mime types model can handle",
"type": "array",
Expand Down Expand Up @@ -206,6 +214,10 @@
"description": "Whether to use tool call middleware",
"type": "boolean"
},
"useReasoningMiddleware": {
"description": "Whether to use reasoning middleware, which extracts reasoning wrapped in <think> tags from the model output",
"type": "boolean"
},
"contentType": {
"description": "The supported mime types model can handle",
"type": "array",
Expand Down Expand Up @@ -267,6 +279,10 @@
"description": "Whether to use tool call middleware",
"type": "boolean"
},
"useReasoningMiddleware": {
"description": "Whether to use reasoning middleware, which extracts reasoning wrapped in <think> tags from the model output",
"type": "boolean"
},
"contentType": {
"description": "The supported mime types model can handle",
"type": "array",
Expand Down Expand Up @@ -397,6 +413,10 @@
"description": "Whether to use tool call middleware",
"type": "boolean"
},
"useReasoningMiddleware": {
"description": "Whether to use reasoning middleware, which extracts reasoning wrapped in <think> tags from the model output",
"type": "boolean"
},
"contentType": {
"description": "The supported mime types model can handle",
"type": "array",
Expand Down Expand Up @@ -454,6 +474,10 @@
"description": "Whether to use tool call middleware",
"type": "boolean"
},
"useReasoningMiddleware": {
"description": "Whether to use reasoning middleware, which extracts reasoning wrapped in <think> tags from the model output",
"type": "boolean"
},
"contentType": {
"description": "The supported mime types model can handle",
"type": "array",
Expand Down
4 changes: 4 additions & 0 deletions packages/cli/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,7 @@ async function createLLMConfigWithVendors(
contextWindow: options.contextWindow,

useToolCallMiddleware: options.useToolCallMiddleware,
useReasoningMiddleware: options.useReasoningMiddleware,
getModel: () =>
createModel(vendorId, {
modelId,
Expand All @@ -728,6 +729,7 @@ async function createLLMConfigWithPochi(
contextWindow: pochiModelOptions.contextWindow,

useToolCallMiddleware: pochiModelOptions.useToolCallMiddleware,
useReasoningMiddleware: pochiModelOptions.useReasoningMiddleware,
getModel: () =>
createModel(vendorId, {
modelId: model,
Expand Down Expand Up @@ -778,6 +780,7 @@ async function createLLMConfigWithProviders(
maxOutputTokens:
modelSetting.maxTokens ?? constants.DefaultMaxOutputTokens,
useToolCallMiddleware: modelSetting.useToolCallMiddleware,
useReasoningMiddleware: modelSetting.useReasoningMiddleware,
contentType: modelSetting.contentType,
};
}
Expand All @@ -801,6 +804,7 @@ async function createLLMConfigWithProviders(
maxOutputTokens:
modelSetting.maxTokens ?? constants.DefaultMaxOutputTokens,
useToolCallMiddleware: modelSetting.useToolCallMiddleware,
useReasoningMiddleware: modelSetting.useReasoningMiddleware,
contentType: modelSetting.contentType,
};
}
Expand Down
6 changes: 6 additions & 0 deletions packages/common/src/configuration/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ const BaseModelSettings = z.object({
.boolean()
.optional()
.describe("Whether to use tool call middleware"),
useReasoningMiddleware: z
.boolean()
.optional()
.describe(
"Whether to use reasoning middleware, which extracts reasoning wrapped in <think> tags from the model output",
),
contentType: z
.array(z.string())
.optional()
Expand Down
1 change: 1 addition & 0 deletions packages/common/src/vendor/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const ModelOptions = z.object({
label: z.string().optional(),
contextWindow: z.number().optional(),
useToolCallMiddleware: z.boolean().optional(),
useReasoningMiddleware: z.boolean().optional(),
contentType: z.array(z.string()).optional(),
});

Expand Down
Loading
Loading