mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-19 13:42:09 +03:00
* test(sse): golden characterization of the executor map before the R0.3 registry refactor Freezes the 137-entry provider-id → executor mapping (class, provider identity, backing PROVIDERS config), the no-shared-instances invariant, and the getExecutor() dispatch rules (memoized DefaultExecutor fallback, cloud-agent guard #6699, search-provider guard #10274) as stable JSON snapshots. The upcoming ExecutorRegistry must keep both snapshots byte-identical. * refactor(sse): route executor lookup through ExecutorRegistry (R0.3) Adds open-sse/executors/registry.ts (Map-based registry mirroring translator/registry.ts): the built-in table in executors/index.ts stays declarative, every entry is registered at module load, and getExecutor()/hasSpecializedExecutor() resolve through the registry. DefaultExecutor fallback, its memoization, and the cloud-agent (#6699) / search-provider (#10274) guards are unchanged. Also fixes a latent lookup leak: the old object-literal lookup treated Object.prototype names (constructor, toString, ...) as specialized executors; the Map registry resolves them to the DefaultExecutor fallback like any unknown provider. Parity proof: executor-map golden (137 entries, byte-identical before/after), check:known-symbols green, 1018 tests across the 65 executor test files green. Docs: OPEN_SSE_ARCHITECTURE factory section corrected (it claimed generation from providerRegistry). Refs #3501 * test(executors): regenerate ExecutorRegistry golden snapshots after release sync release/v3.8.50 sunset mimocode and added cloudflare-playground + jina-search since this PR's snapshots were captured; refresh the golden fixtures to match. --------- Co-authored-by: Xiangzhe <bakryun0718@proton.me> Co-authored-by: Markus Hartung <mail@hartmark.se> Co-authored-by: adevwithpurpose <adevwithpurpose@users.noreply.github.com>
92 lines
3.6 KiB
JSON
92 lines
3.6 KiB
JSON
{
|
|
"cloudAgentGuard": {
|
|
"jules": {
|
|
"message": "Provider \"jules\" is a cloud-agent provider and does not support direct chat completions; use the Cloud Agents task API instead.",
|
|
"status": 400,
|
|
"throws": true
|
|
}
|
|
},
|
|
"fallback": {
|
|
"className": "DefaultExecutor",
|
|
"configSource": "openai",
|
|
"provider": "golden-test-unknown-provider"
|
|
},
|
|
"searchGuard": {
|
|
"brave-search": {
|
|
"message": "Provider \"brave-search\" is a search provider and does not support chat completions; use the /v1/search endpoint instead.",
|
|
"status": 400,
|
|
"throws": true
|
|
},
|
|
"duckduckgo-free": {
|
|
"message": "Provider \"duckduckgo-free\" is a search provider and does not support chat completions; use the /v1/search endpoint instead.",
|
|
"status": 400,
|
|
"throws": true
|
|
},
|
|
"exa-search": {
|
|
"message": "Provider \"exa-search\" is a search provider and does not support chat completions; use the /v1/search endpoint instead.",
|
|
"status": 400,
|
|
"throws": true
|
|
},
|
|
"firecrawl": {
|
|
"message": "Provider \"firecrawl\" is a search provider and does not support chat completions; use the /v1/search endpoint instead.",
|
|
"status": 400,
|
|
"throws": true
|
|
},
|
|
"google-pse-search": {
|
|
"message": "Provider \"google-pse-search\" is a search provider and does not support chat completions; use the /v1/search endpoint instead.",
|
|
"status": 400,
|
|
"throws": true
|
|
},
|
|
"jina-search": {
|
|
"message": "Provider \"jina-search\" is a search provider and does not support chat completions; use the /v1/search endpoint instead.",
|
|
"status": 400,
|
|
"throws": true
|
|
},
|
|
"linkup-search": {
|
|
"message": "Provider \"linkup-search\" is a search provider and does not support chat completions; use the /v1/search endpoint instead.",
|
|
"status": 400,
|
|
"throws": true
|
|
},
|
|
"ollama-search": {
|
|
"message": "Provider \"ollama-search\" is a search provider and does not support chat completions; use the /v1/search endpoint instead.",
|
|
"status": 400,
|
|
"throws": true
|
|
},
|
|
"perplexity-search": {
|
|
"message": "Provider \"perplexity-search\" is a search provider and does not support chat completions; use the /v1/search endpoint instead.",
|
|
"status": 400,
|
|
"throws": true
|
|
},
|
|
"searchapi-search": {
|
|
"message": "Provider \"searchapi-search\" is a search provider and does not support chat completions; use the /v1/search endpoint instead.",
|
|
"status": 400,
|
|
"throws": true
|
|
},
|
|
"searxng-search": {
|
|
"message": "Provider \"searxng-search\" is a search provider and does not support chat completions; use the /v1/search endpoint instead.",
|
|
"status": 400,
|
|
"throws": true
|
|
},
|
|
"serper-search": {
|
|
"message": "Provider \"serper-search\" is a search provider and does not support chat completions; use the /v1/search endpoint instead.",
|
|
"status": 400,
|
|
"throws": true
|
|
},
|
|
"tavily-search": {
|
|
"message": "Provider \"tavily-search\" is a search provider and does not support chat completions; use the /v1/search endpoint instead.",
|
|
"status": 400,
|
|
"throws": true
|
|
},
|
|
"youcom-search": {
|
|
"message": "Provider \"youcom-search\" is a search provider and does not support chat completions; use the /v1/search endpoint instead.",
|
|
"status": 400,
|
|
"throws": true
|
|
},
|
|
"zai-search": {
|
|
"message": "Provider \"zai-search\" is a search provider and does not support chat completions; use the /v1/search endpoint instead.",
|
|
"status": 400,
|
|
"throws": true
|
|
}
|
|
}
|
|
}
|