mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
fixes for default model, and to update the manifest.json file
This commit is contained in:
parent
5cf4cc8f67
commit
fff37bd22e
2 changed files with 16 additions and 5 deletions
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"manifest_version": 3,
|
||||
"name": "ChatGPT Preference-Based Model Selector",
|
||||
"version": "1.2",
|
||||
"description": "Define usage preferences for your ChatGPT models and proxy conversation requests through ArchGW.",
|
||||
"name": "RouteGPT (beta)",
|
||||
"version": "0.1.0",
|
||||
"description": " Dynamically route to GPT models based on usage preferences. Powered by Arch-Router.",
|
||||
"permissions": [
|
||||
"storage",
|
||||
"tabs",
|
||||
|
|
|
|||
|
|
@ -251,16 +251,27 @@ Based on your analysis, provide your response in the following JSON formats if y
|
|||
let targetModel = null;
|
||||
if (selectedRoute) {
|
||||
targetModel = await getModelIdForRoute(selectedRoute);
|
||||
console.log(`${TAG} Resolved model for route "${selectedRoute}" →`, targetModel);
|
||||
if (!targetModel) {
|
||||
const { defaultModel } = await new Promise(resolve =>
|
||||
chrome.storage.sync.get(['defaultModel'], resolve)
|
||||
);
|
||||
targetModel = defaultModel || null;
|
||||
if (targetModel) {
|
||||
console.log(`${TAG} Falling back to default model: ${targetModel}`);
|
||||
}
|
||||
} else {
|
||||
console.log(`${TAG} Resolved model for route "${selectedRoute}" →`, targetModel);
|
||||
}
|
||||
insertRouteLabelForLastUserMessage(selectedRoute);
|
||||
}
|
||||
|
||||
|
||||
const modifiedBody = { ...originalBody };
|
||||
if (targetModel) {
|
||||
modifiedBody.model = targetModel;
|
||||
console.log(`${TAG} Overriding request with model: ${targetModel}`);
|
||||
} else {
|
||||
console.warn(`${TAG} No route/model override applied`);
|
||||
console.log(`${TAG} No route/model override applied`);
|
||||
}
|
||||
|
||||
await streamToPort(await fetch(url, {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue