This commit is contained in:
GH Action - Upstream Sync 2024-09-16 01:07:37 +00:00
commit a69234e715
2 changed files with 3 additions and 2 deletions

View File

@ -98,6 +98,7 @@ async function request(req: NextRequest) {
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
"Cache-Control": "no-store", "Cache-Control": "no-store",
"anthropic-dangerous-direct-browser-access": "true",
[authHeaderName]: authValue, [authHeaderName]: authValue,
"anthropic-version": "anthropic-version":
req.headers.get("anthropic-version") || req.headers.get("anthropic-version") ||

View File

@ -520,8 +520,8 @@ export function ChatActions(props: {
// if current model is not available // if current model is not available
// switch to first available model // switch to first available model
const isUnavaliableModel = !models.some((m) => m.name === currentModel); const isUnavailableModel = !models.some((m) => m.name === currentModel);
if (isUnavaliableModel && models.length > 0) { if (isUnavailableModel && models.length > 0) {
// show next model to default model if exist // show next model to default model if exist
let nextModel = models.find((model) => model.isDefault) || models[0]; let nextModel = models.find((model) => model.isDefault) || models[0];
chatStore.updateCurrentSession((session) => { chatStore.updateCurrentSession((session) => {