mirror of
https://github.com/prdlk/leetcode.git
synced 2026-11-02 13:12:44 +00:00
feat(config): add ASK_MODEL env var and update docs assistant endpoint to SRS API
This commit is contained in:
1 parent
d7fbe88eb8
commit
82fe05b225
4 files changed
+14
-18
No files matched your search
@@ -34,7 +34,10 @@
|
||||
"TO_EMAIL": "prnk28@gmail.com",
|
||||
"DOCS_URL": "https://lc.prd.lk",
|
||||
"DOCS_ORIGIN": "https://lc.prd.lk,https://prdlk.github.io",
|
||||
"PUBLIC_URL": "https://srs-api.prdlk.workers.dev"
|
||||
"PUBLIC_URL": "https://srs-api.prdlk.workers.dev",
|
||||
// The docs assistant's OpenRouter model (POST /ask). `:free` variants share
|
||||
// an upstream pool and answer 429 when it is saturated.
|
||||
"ASK_MODEL": "qwen/qwen3.8-27b:free"
|
||||
}
|
||||
|
||||
// Secrets (wrangler secret put): GH_PAT, WEBHOOK_SECRET, LINK_KEY.
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { defineConfig } from "blume";
|
||||
import { openrouter } from "blume/ai";
|
||||
import type { StandardSchema } from "blume/core/standard-schema.ts";
|
||||
import { custom, filesystem } from "blume/sources";
|
||||
import { githubReleasesSource } from "blume/sources/github-releases.ts";
|
||||
@@ -135,16 +134,14 @@ export default defineConfig({
|
||||
structuredData: true,
|
||||
x: { handle: "@prdlk" },
|
||||
},
|
||||
// The assistant's `/api/ask` route runs on demand and reads
|
||||
// OPENROUTER_API_KEY at request time (`getSecret`), so it needs a server
|
||||
// runtime holding that secret — a static host cannot answer it.
|
||||
// Blume's own assistant route is server-rendered (it reads the provider key
|
||||
// per request), which a static Pages build cannot ship. The SRS Worker
|
||||
// answers instead (apps/api/src/ask.ts: OpenRouter, grounded on this site's
|
||||
// llms-full.txt, which `agents.llmsTxt` publishes).
|
||||
ai: {
|
||||
assistant: {
|
||||
enabled: true,
|
||||
provider: openrouter({
|
||||
model: "qwen/qwen3.8-27b:free",
|
||||
reasoning: "none",
|
||||
}),
|
||||
endpoint: "https://srs-api.prdlk.workers.dev/ask",
|
||||
},
|
||||
},
|
||||
agents: {
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
"doctor": "blume doctor"
|
||||
},
|
||||
"dependencies": {
|
||||
"@openrouter/ai-sdk-provider": "^3.1.0",
|
||||
"blume": "^2.1.0",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
|
||||
Reference in new issue
Block a user