Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

chore: sync local changes (lockfiles, store, ai-gateway models)

Louis Beaumont339e2b688c8c
diff --git a/Cargo.lock b/Cargo.lock
index 05e0487d1..03b67b753 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -6717,7 +6717,7 @@ dependencies = [
[[package]]
name = "screenpipe-audio"
-version = "0.3.237"
+version = "0.3.241"
dependencies = [
"anyhow",
"audiopipe",
@@ -6777,7 +6777,7 @@ dependencies = [
[[package]]
name = "screenpipe-config"
-version = "0.3.237"
+version = "0.3.241"
dependencies = [
"dirs 6.0.0",
"serde",
@@ -6790,7 +6790,7 @@ dependencies = [
[[package]]
name = "screenpipe-connect"
-version = "0.3.237"
+version = "0.3.241"
dependencies = [
"anyhow",
"async-trait",
@@ -6817,7 +6817,7 @@ dependencies = [
[[package]]
name = "screenpipe-core"
-version = "0.3.237"
+version = "0.3.241"
dependencies = [
"accessibility",
"accessibility-sys",
@@ -6862,7 +6862,7 @@ dependencies = [
[[package]]
name = "screenpipe-db"
-version = "0.3.237"
+version = "0.3.241"
dependencies = [
"anyhow",
"chrono",
@@ -6888,7 +6888,7 @@ dependencies = [
[[package]]
name = "screenpipe-engine"
-version = "0.3.237"
+version = "0.3.241"
dependencies = [
"anyhow",
"async-trait",
@@ -6958,7 +6958,7 @@ dependencies = [
[[package]]
name = "screenpipe-events"
-version = "0.3.237"
+version = "0.3.241"
dependencies = [
"anyhow",
"chrono",
@@ -6976,7 +6976,7 @@ dependencies = [
[[package]]
name = "screenpipe-screen"
-version = "0.3.237"
+version = "0.3.241"
dependencies = [
"accessibility-sys",
"anyhow",
@@ -7016,7 +7016,7 @@ dependencies = [
[[package]]
name = "screenpipe-vault"
-version = "0.3.237"
+version = "0.3.241"
dependencies = [
"argon2",
"chacha20poly1305",
diff --git a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
index 8a0c55e07..b23c65ad1 100644
--- a/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/apps/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -9640,7 +9640,7 @@ dependencies = [
[[package]]
name = "screenpipe-app"
-version = "2.2.286"
+version = "2.2.288"
dependencies = [
"anyhow",
"arboard",
@@ -9742,7 +9742,7 @@ dependencies = [
[[package]]
name = "screenpipe-audio"
-version = "0.3.237"
+version = "0.3.240"
dependencies = [
"anyhow",
"audiopipe",
@@ -9797,7 +9797,7 @@ dependencies = [
[[package]]
name = "screenpipe-config"
-version = "0.3.237"
+version = "0.3.240"
dependencies = [
"dirs 6.0.0",
"serde",
@@ -9809,7 +9809,7 @@ dependencies = [
[[package]]
name = "screenpipe-connect"
-version = "0.3.237"
+version = "0.3.240"
dependencies = [
"anyhow",
"async-trait",
@@ -9836,7 +9836,7 @@ dependencies = [
[[package]]
name = "screenpipe-core"
-version = "0.3.237"
+version = "0.3.240"
dependencies = [
"accessibility",
"accessibility-sys",
@@ -9880,7 +9880,7 @@ dependencies = [
[[package]]
name = "screenpipe-db"
-version = "0.3.237"
+version = "0.3.240"
dependencies = [
"anyhow",
"chrono",
@@ -9905,7 +9905,7 @@ dependencies = [
[[package]]
name = "screenpipe-engine"
-version = "0.3.237"
+version = "0.3.240"
dependencies = [
"anyhow",
"async-trait",
@@ -9968,7 +9968,7 @@ dependencies = [
[[package]]
name = "screenpipe-events"
-version = "0.3.237"
+version = "0.3.240"
dependencies = [
"anyhow",
"chrono",
@@ -9984,7 +9984,7 @@ dependencies = [
[[package]]
name = "screenpipe-screen"
-version = "0.3.237"
+version = "0.3.240"
dependencies = [
"accessibility-sys",
"anyhow",
@@ -10020,7 +10020,7 @@ dependencies = [
[[package]]
name = "screenpipe-vault"
-version = "0.3.237"
+version = "0.3.240"
dependencies = [
"argon2",
"chacha20poly1305",
diff --git a/apps/screenpipe-app-tauri/src-tauri/src/store.rs b/apps/screenpipe-app-tauri/src-tauri/src/store.rs
index 5288a422d..498bf07ba 100644
--- a/apps/screenpipe-app-tauri/src-tauri/src/store.rs
+++ b/apps/screenpipe-app-tauri/src-tauri/src/store.rs
@@ -440,7 +440,8 @@ impl Default for SettingsStore {
// Default free AI preset - works without login
let default_free_preset = AIPreset {
id: "screenpipe-free".to_string(),
- prompt: r#"Rules:
+ prompt: r#"IMPORTANT: At the start of every conversation, read the files in .pi/skills/ directory (e.g. .pi/skills/screenpipe-api/SKILL.md and .pi/skills/screenpipe-cli/SKILL.md) before responding.
+Rules:
- You can analyze/view/show/access videos to the user by putting .mp4 files in a code block (we'll render it) like this: `/users/video.mp4`, use the exact, absolute, file path from file_path property
- Do not try to embed video in links (e.g. [](.mp4) or https://.mp4) instead put the file_path in a code block using backticks
- Do not put video in multiline code block it will not render the video (e.g. ```bash\n.mp4```) instead using inline code block with single backtick
diff --git a/packages/ai-gateway/src/handlers/chat.ts b/packages/ai-gateway/src/handlers/chat.ts
index 14720fbee..ed264844f 100644
--- a/packages/ai-gateway/src/handlers/chat.ts
+++ b/packages/ai-gateway/src/handlers/chat.ts
@@ -17,9 +17,10 @@ const AUTO_WATERFALL = [
// Vision-capable models for requests containing images
const AUTO_WATERFALL_VISION = [
- 'kimi-k2.5', // free (Vertex MaaS), natively multimodal, strong vision
- 'gemini-3-flash', // near-free, excellent vision
- 'gemini-2.5-flash',
+ 'llama-4-maverick', // free (Vertex MaaS), 400B MoE, strong vision + reasoning
+ 'gemini-3-flash', // near-free, good vision
+ 'llama-4-scout', // free (Vertex MaaS), 109B MoE, decent vision fallback
+ 'gemini-2.5-flash', // backup vision option
];
function hasImages(body: RequestBody): boolean {
@@ -72,11 +73,27 @@ async function tryModel(model: string, body: RequestBody, env: Env): Promise<Res
}
}
+const SCREENPIPE_SYSTEM_HINT = `You have screenpipe skills. At the start of every conversation, read the files in .pi/skills/ directory (e.g. .pi/skills/screenpipe-api/SKILL.md and .pi/skills/screenpipe-cli/SKILL.md) before responding.`;
+
+/** Prepend a screenpipe system hint if no system message already mentions screenpipe */
+function ensureScreenpipeHint(body: RequestBody): RequestBody {
+ const hasScreenpipeContext = body.messages.some(
+ (m) => m.role === 'system' && typeof m.content === 'string' && m.content.toLowerCase().includes('screenpipe')
+ );
+ if (hasScreenpipeContext) return body;
+ return {
+ ...body,
+ messages: [{ role: 'system', content: SCREENPIPE_SYSTEM_HINT }, ...body.messages],
+ };
+}
+
/**
* Handles chat completion requests.
* Logs success/failure per model for health tracking.
*/
export async function handleChatCompletions(body: RequestBody, env: Env): Promise<Response> {
+ // Ensure free/auto models know about screenpipe capabilities
+ body = ensureScreenpipeHint(body);
// Auto model: waterfall through free models until one succeeds
if (body.model === 'auto') {
let lastError: any = null;
diff --git a/packages/ai-gateway/src/handlers/models.ts b/packages/ai-gateway/src/handlers/models.ts
index de83dbee5..051524506 100644
--- a/packages/ai-gateway/src/handlers/models.ts
+++ b/packages/ai-gateway/src/handlers/models.ts
@@ -95,6 +95,36 @@ const CURATED_MODELS: ModelEntry[] = [
cost_tier: 'free',
recommended_for: ['pipes', 'chat'],
},
+ {
+ id: 'llama-4-maverick',
+ object: 'model',
+ owned_by: 'vertex-maas',
+ name: 'Llama 4 Maverick (Vision)',
+ description: 'best free vision model, 400B MoE, strong image understanding',
+ tags: ['free', 'vision', 'reasoning'],
+ free: true,
+ context_window: 524000,
+ best_for: ['vision', 'image analysis', 'reasoning'],
+ speed: 'medium',
+ intelligence: 'high',
+ cost_tier: 'free',
+ recommended_for: ['chat', 'analysis'],
+ },
+ {
+ id: 'llama-4-scout',
+ object: 'model',
+ owned_by: 'vertex-maas',
+ name: 'Llama 4 Scout (Vision)',
+ description: 'fast free vision model, 109B MoE',
+ tags: ['free', 'vision'],
+ free: true,
+ context_window: 512000,
+ best_for: ['vision', 'general'],
+ speed: 'fast',
+ intelligence: 'standard',
+ cost_tier: 'free',
+ recommended_for: ['pipes', 'chat'],
+ },
{
id: 'gemini-3-flash',
object: 'model',
diff --git a/packages/ai-gateway/src/providers/vertex-maas.ts b/packages/ai-gateway/src/providers/vertex-maas.ts
index 7c606b007..db1cd0292 100644
--- a/packages/ai-gateway/src/providers/vertex-maas.ts
+++ b/packages/ai-gateway/src/providers/vertex-maas.ts
@@ -40,22 +40,30 @@ async function fetchWithRetry(url: string, init: RequestInit, label: string): Pr
return fetch(url, init);
}
-// Vertex MaaS model IDs — model names without publisher prefix, all on global endpoint
+// Vertex MaaS model IDs — short name → Vertex publisher/model ID + region
const VERTEX_MAAS_MODELS: Record<string, { vertexId: string; region: string }> = {
'glm-4.7': { vertexId: 'zai-org/glm-4.7-maas', region: 'global' },
'glm-5': { vertexId: 'zai-org/glm-5-maas', region: 'global' },
'kimi-k2.5': { vertexId: 'moonshotai/kimi-k2-thinking-maas', region: 'global' },
+ 'llama-4-maverick': { vertexId: 'meta/llama-4-maverick-17b-128e-instruct-maas', region: 'us-east5' },
+ 'llama-4-scout': { vertexId: 'meta/llama-4-scout-17b-16e-instruct-maas', region: 'us-east5' },
};
export function isVertexMaasModel(model: string): boolean {
const lower = model.toLowerCase();
- return Object.keys(VERTEX_MAAS_MODELS).some((key) => lower.includes(key));
+ // Exact match first (e.g. "llama-4-maverick"), then substring for legacy names.
+ // This prevents "meta-llama/llama-4-maverick" (OpenRouter) from matching.
+ return Object.keys(VERTEX_MAAS_MODELS).some((key) => lower === key) ||
+ ['glm-', 'kimi-'].some((prefix) => lower.includes(prefix));
}
export function resolveVertexMaasModel(model: string): { vertexId: string; region: string } | null {
const lower = model.toLowerCase();
+ // Exact match first
+ if (VERTEX_MAAS_MODELS[lower]) return VERTEX_MAAS_MODELS[lower];
+ // Substring fallback for GLM/Kimi variants
for (const [key, value] of Object.entries(VERTEX_MAAS_MODELS)) {
- if (lower.includes(key)) return value;
+ if (lower.includes(key) && !lower.includes('/')) return value;
}
return null;
}
@@ -195,6 +203,8 @@ export class VertexMaasProvider implements AIProvider {
{ id: 'glm-4.7', name: 'GLM-4.7 (best coding, 200K ctx)', provider: 'vertex-maas' },
{ id: 'glm-5', name: 'GLM-5 (top reasoning, 745B)', provider: 'vertex-maas' },
{ id: 'kimi-k2.5', name: 'Kimi K2.5 (strong all-rounder)', provider: 'vertex-maas' },
+ { id: 'llama-4-maverick', name: 'Llama 4 Maverick (vision, 400B MoE)', provider: 'vertex-maas' },
+ { id: 'llama-4-scout', name: 'Llama 4 Scout (vision, 109B MoE)', provider: 'vertex-maas' },
];
}
}