decolua
d3f61aac2f
refactor(open-sse): translator DRY + schema enums, bug fixes, dead code cleanup
...
- Bug B1-B7: media UI m.kind||m.type, serviceKinds, gemini mediaPriority, schema kind, models/info lookup by kind
- Dead code D1-D6: safeParseJSON, drop PROVIDER_ENDPOINTS, orphan fetcher, GITHUB_CONFIG derive, getProviderConfig internal, legacy kiro file
- Translator concerns: toOpenAIUsage, toOpenAIFinish (gemini/kiro/ollama + fix kiro tool finish), thinking effort maps
- Reorg helpers/ → concerns/ (logic) + formats/ (per-format) + schema/ (pure enums: roles/blocks/finishReasons/defaults)
- Wire ~280 hardcoded role/block/finish/default literals to schema enums across 20+ files
- collapseTextParts + extractTextContent dedup
- Normalize translator fn names to openaiToXRequest / xToOpenAIResponse
- Golden tests lock behavior; 0 regression (byte-for-byte providers/alias, 26=26 known fails)
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-06-14 18:49:38 +07:00
decolua
633b66dcb6
refactor(translator): P4 concern #5 buildUsage — apply to kiro/ollama/commandcode
...
- Replace 3 inline {prompt,completion,total} usage objects with buildUsage()
- Preserves ?? vs total fallback semantics (commandcode)
- Golden tests pass, identical output
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-06-13 21:27:22 +07:00
decolua
6597b81e5e
refactor(open-sse): add reasoningDelta helper, dedup thinking deltas (B4)
...
Centralize the reasoning_content delta shape (optional assistant role) used by
claude/gemini/kiro/codex/commandcode response translators. Keeps the cross-format
convention consistent for future translators. Output byte-for-byte identical;
golden + gate clean. Ollama left as-is (mutates existing delta object).
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-06-13 18:21:46 +07:00
decolua
997860aa1f
refactor(open-sse): dedup fallback tool_call id helper (B3)
...
Add fallbackToolCallId() and apply to kiro/ollama/openai-responses response
translators (identical id shape). Leave commandcode (different order) and
request-side gemini/antigravity (random suffix) untouched. Golden + gate clean.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-06-13 18:12:40 +07:00
decolua
17202f7111
refactor(open-sse): extract chunkBuilder, dedup chat.completion.chunk (B1)
...
Add helpers/chunkBuilder.js; apply to claude/gemini/kiro/ollama/commandcode/
openai-responses response translators. Caller supplies id/created/model so each
keeps exact id-generation + usage semantics. Extend golden response stream to
openai-responses (codex). No behavior change; gate: no regression.
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-06-13 17:05:42 +07:00
decolua
4a575f21a2
https://github.com/decolua/9router/pull/1167
...
https://github.com/decolua/9router/pull/1166
2026-05-16 11:20:08 +07:00
decolua
df0e1d6485
feat: Update response handling and logging for improved usage tracking
2026-02-03 10:22:43 +07:00
decolua
a33924b336
feat: Enhance usage tracking across response handlers
2026-02-03 00:29:22 +07:00
decolua
0a28f9f924
feat: Add OpenAI-compatible provider nodes
...
- Support multiple OpenAI-compatible providers with custom prefix/baseUrl
- Add provider nodes CRUD (create/read/update/delete)
- URL building: baseUrl + /chat/completions or /responses
- Model import from /models endpoint
- API key validation via /models
- Usage type safety across all translators
- OAuth token auto-refresh for expired tokens
2026-02-02 19:45:12 +07:00
decolua
c7219d0ac9
Fix cloud
2026-01-29 18:07:28 +07:00
decolua
26b61e5fbb
Feat Kiro OAuth, Fix Codex
2026-01-15 18:29:47 +07:00