llm-switcher 1.1.11 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +63 -0
- package/README.md +202 -257
- package/README.vi.md +200 -256
- package/blindfold/blindfold.mjs +200 -53
- package/blindfold/make-certs.sh +26 -7
- package/catalog.mjs +246 -0
- package/classifier.mjs +238 -0
- package/config.example.json +12 -34
- package/docs/codex-blindfold.md +28 -17
- package/docs/cross-platform.md +16 -7
- package/docs/diagrams/ir-healer-pipeline.mmd +16 -0
- package/docs/diagrams/ir-healer-pipeline.png +0 -0
- package/docs/diagrams/ir-healer-pipeline.svg +90 -0
- package/docs/diagrams/ir-translation-pipeline.html +14925 -0
- package/docs/diagrams/ir-translation-pipeline.sequence.json +31 -0
- package/docs/diagrams/ir-translation-pipeline.svg +5128 -0
- package/docs/diagrams/system-architecture.architecture.json +76 -0
- package/docs/diagrams/system-architecture.html +14978 -0
- package/docs/diagrams/system-architecture.svg +5147 -0
- package/docs/diagrams/system-topology.mmd +30 -0
- package/docs/diagrams/system-topology.png +0 -0
- package/docs/diagrams/system-topology.svg +125 -0
- package/ensure-ca-bundle.mjs +28 -0
- package/formats.mjs +43 -156
- package/icons/antigravity.png +0 -0
- package/icons/claude.png +0 -0
- package/icons/codex.png +0 -0
- package/icons/deepseek.png +0 -0
- package/icons/gemini.png +0 -0
- package/icons/github.png +0 -0
- package/icons/groq.png +0 -0
- package/icons/intact.svg +1 -0
- package/icons/ollama.png +0 -0
- package/icons/openai.png +0 -0
- package/icons/openrouter.png +0 -0
- package/icons/qwen.png +0 -0
- package/icons/vertex.png +0 -0
- package/mcp.mjs +39 -11
- package/package.json +1 -1
- package/proxy.mjs +114 -37
- package/shim.mjs +200 -57
- package/skills/llm-switcher/SKILL.md +15 -10
- package/state.mjs +1100 -191
- package/switch.cmd +2 -2
- package/switch.mjs +228 -53
- package/tests/blindfold-e2e.test.mjs +380 -0
- package/tests/blindfold-task5.test.mjs +429 -0
- package/tests/blindfold.task3.test.mjs +700 -0
- package/tests/blindfold.test.mjs +10 -5
- package/tests/catalog.test.mjs +147 -0
- package/tests/classifier.test.mjs +210 -0
- package/tests/contract-lab.test.mjs +22 -7
- package/tests/formats.test.mjs +63 -46
- package/tests/gateway.e2e.test.mjs +136 -36
- package/tests/lifecycle.test.mjs +16 -10
- package/tests/mcp.test.mjs +78 -2
- package/tests/real-user-sim.test.mjs +464 -0
- package/tests/shim.test.mjs +159 -66
- package/tests/state.test.mjs +975 -193
- package/tests/switch.test.mjs +446 -2
- package/ui.html +1710 -1726
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": 1,
|
|
3
|
+
"diagram_type": "sequence",
|
|
4
|
+
"meta": {
|
|
5
|
+
"title": "Bi-Directional IR Translation & Self-Healing Pipeline",
|
|
6
|
+
"output": "docs/diagrams/ir-translation-pipeline.html",
|
|
7
|
+
"viewBox": [1080, 560],
|
|
8
|
+
"column_fit": "spread",
|
|
9
|
+
"quality_profile": "showcase"
|
|
10
|
+
},
|
|
11
|
+
"participants": [
|
|
12
|
+
{ "id": "client", "type": "external", "label": "Client Agent", "sublabel": "Claude Code / Codex" },
|
|
13
|
+
{ "id": "gateway", "type": "backend", "label": "Edge Gateway", "sublabel": "localhost:3456" },
|
|
14
|
+
{ "id": "healer", "type": "security", "label": "Healer & IR Engine", "sublabel": "Self-Healing Normalize" },
|
|
15
|
+
{ "id": "upstream", "type": "cloud", "label": "Upstream API", "sublabel": "intact / 9Router / Vertex" }
|
|
16
|
+
],
|
|
17
|
+
"segments": [
|
|
18
|
+
{ "from": 150, "to": 260, "label": "Inbound Normalization & Healing" },
|
|
19
|
+
{ "from": 270, "to": 440, "label": "Outbound Streaming & Return Synthesis" }
|
|
20
|
+
],
|
|
21
|
+
"messages": [
|
|
22
|
+
{ "id": "m1", "from": "client", "to": "gateway", "y": 165, "label": "POST /v1/messages or /v1/responses", "variant": "emphasis" },
|
|
23
|
+
{ "id": "m2", "from": "gateway", "to": "healer", "y": 200, "label": "parseToIR(clientFormat, payload)" },
|
|
24
|
+
{ "id": "m3", "from": "healer", "to": "gateway", "y": 235, "label": "emitUpstreamBody(outFormat, healedIR)", "variant": "return" },
|
|
25
|
+
{ "id": "m4", "from": "gateway", "to": "upstream", "y": 285, "label": "POST upstream endpoint (with AbortSignal)", "variant": "emphasis" },
|
|
26
|
+
{ "id": "m5", "from": "upstream", "to": "gateway", "y": 325, "label": "Raw stream chunks (OpenAI / Vertex / Anthropic)", "variant": "return" },
|
|
27
|
+
{ "id": "m6", "from": "gateway", "to": "healer", "y": 365, "label": "normalizeUpstream(chunk) & parse reasoning" },
|
|
28
|
+
{ "id": "m7", "from": "healer", "to": "gateway", "y": 395, "label": "Native client event stream chunks", "variant": "return" },
|
|
29
|
+
{ "id": "m8", "from": "gateway", "to": "client", "y": 425, "label": "Synthesized genuine SSE (thinking_delta + text)", "variant": "emphasis" }
|
|
30
|
+
]
|
|
31
|
+
}
|