Skip to content

Commit 3561da4

Browse files
authored
☁️ feat: Additional AI Gateway Provider Support; fix: Reasoning Effort for Presets/Agents (danny-avila#5600)
* 🐛 fix: Prevent processing of non-artifact nodes in artifact plugin * refactor: remove deprecated fields, add `reasoning_effort` * refactor: move `reasoning_effort` to the second column in OpenAI settings * feat: add support for additional AI Gateway provider in extractBaseURL function * refactor: move `reasoning_effort` field to conversationPreset and remove from agentOptions
1 parent e5ac058 commit 3561da4

File tree

4 files changed

+19
-7
lines changed

4 files changed

+19
-7
lines changed

api/models/schema/defaults.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ const conversationPreset = {
117117
max_tokens: {
118118
type: Number,
119119
},
120+
/** omni models only */
121+
reasoning_effort: {
122+
type: String,
123+
},
120124
};
121125

122126
const agentOptions = {
@@ -166,12 +170,6 @@ const agentOptions = {
166170
type: Number,
167171
required: false,
168172
},
169-
context: {
170-
type: String,
171-
},
172-
systemMessage: {
173-
type: String,
174-
},
175173
};
176174

177175
module.exports = {

api/utils/extractBaseURL.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,17 @@ function extractBaseURL(url) {
4040
const suffixes = [
4141
'azure-openai',
4242
openai,
43+
'aws-bedrock',
44+
'anthropic',
45+
'cohere',
46+
'deepseek',
47+
'google-ai-studio',
48+
'google-vertex-ai',
49+
'grok',
50+
'groq',
51+
'mistral',
52+
'openrouter',
53+
'perplexity-ai',
4354
'replicate',
4455
'huggingface',
4556
'workers-ai',

client/src/components/Artifacts/Artifact.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ import ArtifactButton from './ArtifactButton';
1212
export const artifactPlugin: Pluggable = () => {
1313
return (tree) => {
1414
visit(tree, ['textDirective', 'leafDirective', 'containerDirective'], (node) => {
15+
if (node.name !== 'artifact') {
16+
return;
17+
}
1518
node.data = {
1619
hName: node.name,
1720
hProperties: node.attributes,

client/src/components/SidePanel/Parameters/settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,6 @@ const openAICol1: SettingsConfiguration = [
468468
openAIParams.chatGptLabel,
469469
librechat.promptPrefix,
470470
librechat.maxContextTokens,
471-
openAIParams.reasoning_effort,
472471
];
473472

474473
const openAICol2: SettingsConfiguration = [
@@ -478,6 +477,7 @@ const openAICol2: SettingsConfiguration = [
478477
openAIParams.frequency_penalty,
479478
openAIParams.presence_penalty,
480479
baseDefinitions.stop,
480+
openAIParams.reasoning_effort,
481481
librechat.resendFiles,
482482
baseDefinitions.imageDetail,
483483
];

0 commit comments

Comments
 (0)