Fix: expand CSP connectSrc for CDN/TTS; add vendor model 4.6 models
- CSP connectSrc was blocking service worker re-fetches to cdnjs.cloudflare.com causing Font Awesome icons to go blank (settings, logout, nextcloud buttons) - Add cdnjs, googleapis, gstatic, google to connectSrc to fix icon rendering and Chrome Web Speech API (which connects to Google servers for TTS voices) - Add vendor model Opus 4.6 and vendor model Sonnet 4.6 to all three provider lists (OpenRouter, Bedrock, Azure-compatible); Sonnet 4.6 now default for Bedrock
This commit is contained in:
parent
12083a5ed1
commit
624e815226
2 changed files with 8 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ app.use(helmet({
|
|||
fontSrc: ["'self'", 'https://fonts.gstatic.com', 'https://cdnjs.cloudflare.com'],
|
||||
imgSrc: ["'self'", 'data:', 'blob:'],
|
||||
mediaSrc: ["'self'", 'blob:'],
|
||||
connectSrc: ["'self'"],
|
||||
connectSrc: ["'self'", 'https://cdnjs.cloudflare.com', 'https://fonts.googleapis.com', 'https://fonts.gstatic.com', 'https://www.google.com', 'wss://www.google.com'],
|
||||
workerSrc: ["'self'"],
|
||||
frameSrc: ["'none'"],
|
||||
objectSrc: ["'none'"],
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ var OPENROUTER_MODELS = [
|
|||
{ id: 'openai/gpt-4.1', name: 'GPT-4.1', cost: '~$0.01', tag: 'PREMIUM', category: 'premium' },
|
||||
{ id: 'openai/gpt-4.1-mini', name: 'GPT-4.1 Mini', cost: '~$0.003', tag: 'SMART', category: 'smart' },
|
||||
{ id: 'openai/o4-mini', name: 'o4-mini (Reasoning)', cost: '~$0.01', tag: 'REASONING', category: 'premium' },
|
||||
{ id: 'anthropic/vendor-model-opus-4-6', name: 'vendor model Opus 4.6', cost: '~$0.075', tag: 'BEST NUANCE', category: 'premium' },
|
||||
{ id: 'anthropic/vendor-model-sonnet-4-6', name: 'vendor model Sonnet 4.6', cost: '~$0.015', tag: 'RECOMMENDED', category: 'premium' },
|
||||
{ id: 'anthropic/vendor-model-sonnet-4', name: 'vendor model Sonnet 4', cost: '~$0.015', tag: 'PREMIUM', category: 'premium' },
|
||||
{ id: 'anthropic/vendor-model-3.5-sonnet', name: 'vendor model 3.5 Sonnet', cost: '~$0.015', tag: 'MEDICAL', category: 'premium' },
|
||||
{ id: 'mistralai/mistral-large-2411', name: 'Mistral Large', cost: '~$0.006', tag: 'GOOD', category: 'smart' },
|
||||
|
|
@ -25,6 +27,10 @@ var OPENROUTER_MODELS = [
|
|||
];
|
||||
|
||||
var BEDROCK_MODELS = [
|
||||
{ id: 'anthropic/vendor-model-opus-4-6', name: 'vendor model Opus 4.6', cost: '~$0.075', tag: 'BEST NUANCE', category: 'premium',
|
||||
bedrockId: 'anthropic.agent-config-opus-4-6-20251001-v1:0' },
|
||||
{ id: 'anthropic/vendor-model-sonnet-4-6', name: 'vendor model Sonnet 4.6', cost: '~$0.015', tag: 'RECOMMENDED', category: 'premium',
|
||||
bedrockId: 'anthropic.agent-config-sonnet-4-6-20251001-v1:0' },
|
||||
{ id: 'anthropic/vendor-model-sonnet-4', name: 'vendor model Sonnet 4', cost: '~$0.015', tag: 'BEST', category: 'premium',
|
||||
bedrockId: 'anthropic.agent-config-sonnet-4-20250514-v1:0' },
|
||||
{ id: 'anthropic/vendor-model-3.5-sonnet', name: 'vendor model 3.5 Sonnet', cost: '~$0.015', tag: 'MEDICAL', category: 'premium',
|
||||
|
|
@ -63,7 +69,7 @@ function getAvailableModels() {
|
|||
|
||||
function getDefaultModel() {
|
||||
switch (activeProvider) {
|
||||
case 'bedrock': return 'anthropic/vendor-model-3-haiku';
|
||||
case 'bedrock': return 'anthropic/vendor-model-sonnet-4-6';
|
||||
case 'azure': return process.env.AZURE_DEPLOYMENT_NAME || 'gpt-4o-mini';
|
||||
case 'openrouter':
|
||||
default: return 'google/gemini-2.5-flash';
|
||||
|
|
|
|||
Loading…
Reference in a new issue