mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
☁️ feat: Additional AI Gateway Provider Support; fix: Reasoning Effort for Presets/Agents (#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
This commit is contained in:
parent
352565c9a6
commit
d93f5c9061
4 changed files with 19 additions and 7 deletions
|
|
@ -117,6 +117,10 @@ const conversationPreset = {
|
||||||
max_tokens: {
|
max_tokens: {
|
||||||
type: Number,
|
type: Number,
|
||||||
},
|
},
|
||||||
|
/** omni models only */
|
||||||
|
reasoning_effort: {
|
||||||
|
type: String,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const agentOptions = {
|
const agentOptions = {
|
||||||
|
|
@ -166,12 +170,6 @@ const agentOptions = {
|
||||||
type: Number,
|
type: Number,
|
||||||
required: false,
|
required: false,
|
||||||
},
|
},
|
||||||
context: {
|
|
||||||
type: String,
|
|
||||||
},
|
|
||||||
systemMessage: {
|
|
||||||
type: String,
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,17 @@ function extractBaseURL(url) {
|
||||||
const suffixes = [
|
const suffixes = [
|
||||||
'azure-openai',
|
'azure-openai',
|
||||||
openai,
|
openai,
|
||||||
|
'aws-bedrock',
|
||||||
|
'anthropic',
|
||||||
|
'cohere',
|
||||||
|
'deepseek',
|
||||||
|
'google-ai-studio',
|
||||||
|
'google-vertex-ai',
|
||||||
|
'grok',
|
||||||
|
'groq',
|
||||||
|
'mistral',
|
||||||
|
'openrouter',
|
||||||
|
'perplexity-ai',
|
||||||
'replicate',
|
'replicate',
|
||||||
'huggingface',
|
'huggingface',
|
||||||
'workers-ai',
|
'workers-ai',
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,9 @@ import ArtifactButton from './ArtifactButton';
|
||||||
export const artifactPlugin: Pluggable = () => {
|
export const artifactPlugin: Pluggable = () => {
|
||||||
return (tree) => {
|
return (tree) => {
|
||||||
visit(tree, ['textDirective', 'leafDirective', 'containerDirective'], (node) => {
|
visit(tree, ['textDirective', 'leafDirective', 'containerDirective'], (node) => {
|
||||||
|
if (node.name !== 'artifact') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
node.data = {
|
node.data = {
|
||||||
hName: node.name,
|
hName: node.name,
|
||||||
hProperties: node.attributes,
|
hProperties: node.attributes,
|
||||||
|
|
|
||||||
|
|
@ -468,7 +468,6 @@ const openAICol1: SettingsConfiguration = [
|
||||||
openAIParams.chatGptLabel,
|
openAIParams.chatGptLabel,
|
||||||
librechat.promptPrefix,
|
librechat.promptPrefix,
|
||||||
librechat.maxContextTokens,
|
librechat.maxContextTokens,
|
||||||
openAIParams.reasoning_effort,
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const openAICol2: SettingsConfiguration = [
|
const openAICol2: SettingsConfiguration = [
|
||||||
|
|
@ -478,6 +477,7 @@ const openAICol2: SettingsConfiguration = [
|
||||||
openAIParams.frequency_penalty,
|
openAIParams.frequency_penalty,
|
||||||
openAIParams.presence_penalty,
|
openAIParams.presence_penalty,
|
||||||
baseDefinitions.stop,
|
baseDefinitions.stop,
|
||||||
|
openAIParams.reasoning_effort,
|
||||||
librechat.resendFiles,
|
librechat.resendFiles,
|
||||||
baseDefinitions.imageDetail,
|
baseDefinitions.imageDetail,
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue