You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -70,6 +70,13 @@ Adicionar suporte nativo e backward-compatible para Kimi K2.5 da Moonshot AI com
70
70
-`npm run typecheck`
71
71
-`npm run validate:manifest`, se novos arquivos entrarem no pacote instalável.
72
72
73
+
## PO Validation
74
+
75
+
- Story 184.1 validada em 2026-05-08 contra `origin/main` após merge do PR #710.
76
+
- Nenhuma story anterior existe na Epic 184, então não há divergência cross-story.
77
+
- Ajustes adicionados à story: export do provider em `index.js`, atualização de README/template `.aiox-ai-config.yaml`, fallback configurável no `subagent-dispatcher` e neutralização do JSDoc CLI-only em `AIProvider`.
78
+
- Resultado: Ready para implementação, mantendo #184 aberto até existir evidência runtime.
Copy file name to clipboardExpand all lines: docs/stories/epic-184-kimi-provider/STORY-184.1-OPENAI-COMPATIBLE-KIMI-PROVIDER.md
+44-5Lines changed: 44 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
|-------|-------|
7
7
| Story ID | 184.1 |
8
8
| Epic |[184 - Kimi K2.5 Provider Support](./EPIC-184-KIMI-K2-5-PROVIDER.md)|
9
-
| Status |Draft|
9
+
| Status |Ready|
10
10
| Executor |@dev|
11
11
| Quality Gate |@architect|
12
12
| quality_gate_tools | npm test focused, npm run lint, npm run typecheck, npm run validate:manifest|
@@ -21,8 +21,8 @@
21
21
## Status
22
22
23
23
-[x] Draft
24
-
-[] PO validated
25
-
-[] Ready for implementation
24
+
-[x] PO validated
25
+
-[x] Ready for implementation
26
26
-[ ] Ready for Review
27
27
-[ ] Done
28
28
@@ -77,6 +77,8 @@ The correct implementation path is a reusable `OpenAICompatibleProvider` plus a
77
77
- [ ] AC8: Documentation shows `.aiox-ai-config.yaml` examples for Moonshot/Kimi and OpenRouter-style overrides without committing secrets.
78
78
- [ ] AC9: Existing Claude/Gemini provider tests continue to pass unchanged in behavior.
79
79
- [ ] AC10: The story does not merge or depend on the stale Kimi IDE sync worktree; IDE sync can become a separate future story if still desired.
80
+
- [ ] AC11: `.aiox-core/infrastructure/integrations/ai-providers/index.js`, provider README and `.aiox-core/product/templates/aiox-ai-config.yaml` expose the new provider without changing current Claude/Gemini defaults.
81
+
- [ ] AC12: `subagent-dispatcher.js`continues to work when the selected provider is `kimi` or `openai-compatible`, including fallback selection from configuration rather than hardcoding only Claude/Gemini.
80
82
81
83
## CodeRabbit Integration
82
84
@@ -112,6 +114,8 @@ The correct implementation path is a reusable `OpenAICompatibleProvider` plus a
112
114
- [ ] T5: Update docs with Kimi/Moonshot and OpenRouter configuration examples.
113
115
- [ ] T6: Update manifest/entity registry only if required by existing packaging gates.
114
116
- [ ] T7: Run focused tests, lint, typecheck and manifest validation.
117
+
- [ ] T8: Export `OpenAICompatibleProvider` from the provider module index and factory exports.
118
+
- [ ] T9: Update `subagent-dispatcher.js` fallback logic so configured non-CLI providers do not fall back through a hardcoded Claude/Gemini toggle.
115
119
116
120
## Dev Notes
117
121
@@ -121,6 +125,10 @@ The correct implementation path is a reusable `OpenAICompatibleProvider` plus a
121
125
- Treat `baseURL` and `baseUrl` as equivalent input names for compatibility with common OpenAI-style config.
122
126
- Preserve current default provider behavior: `primary: claude`, `fallback: gemini`.
123
127
- The stale `aiox-core-kimi` branch/worktree is scoped to IDE sync and should not be replayed into this story without a separate decision.
128
+
- `ai-provider.js`currently describes the base class as CLI-focused; implementation should update wording/contracts only as needed so HTTP providers are first-class while preserving the existing `AIResponse` shape.
129
+
- `ai-provider-factory.js`currently merges only `claude` and `gemini` config keys; implementation must merge configured OpenAI-compatible provider keys without dropping unknown provider configs.
130
+
- `getAvailableProviders()`and `getProvidersStatus()` currently hardcode `claude` and `gemini`; implementation should derive the provider set from defaults plus configured providers and aliases.
131
+
- Existing factory tests currently do not `await` async provider status functions; new or updated tests should make async assertions deterministic.
124
132
125
133
## Testing
126
134
@@ -138,16 +146,45 @@ If the provider test lands under a different path, update this section and the F
138
146
139
147
## Dependencies
140
148
141
-
- **Blocked by:** PO/architect validation of this draft.
149
+
- **Blocked by:** None after PO validation on 2026-05-08.
142
150
- **Blocks:** issue #184 closure.
143
151
- **Related:** issue #137; existing LLM routing docs; Kimi IDE sync branch is adjacent but not in scope.
144
152
145
153
## Definition of Ready
146
154
147
-
- [] PO validation completed with no unresolved blocker.
155
+
- [x] PO validation completed with no unresolved blocker.
148
156
- [x] Target provider surfaces confirmed against current code reality.
149
157
- [x] Acceptance criteria are testable without live API calls.
150
158
159
+
## PO Validation Report
160
+
161
+
### Phase 0: Epic Context
162
+
163
+
- Epic context loaded from `docs/stories/epic-184-kimi-provider/EPIC-184-KIMI-K2-5-PROVIDER.md`.
- Findings from prior stories: none. This is the first and only story in Epic 184.
166
+
- Filesystem conflicts: none. `OpenAICompatibleProvider` does not exist yet.
167
+
- Dependency status: all met after publishing the Epic/Story plan in PR #710.
168
+
169
+
### D10 Incremental Analysis
170
+
171
+
- No previous completed story exists in Epic 184, so there is no executor, schema, endpoint or IDS divergence from earlier work.
172
+
- Adjacent stale `aiox-core-kimi` branch/worktree remains out of scope because it targets IDE sync rather than runtime LLM provider support.
173
+
174
+
### Code Reality Check
175
+
176
+
- `ai-provider-factory.js`still registers only `claude` and `gemini`, and `getAvailableProviders()`/`getProvidersStatus()` are hardcoded to those providers.
177
+
- `index.js`exports only `AIProvider`, `ClaudeProvider`, `GeminiProvider` and factory helpers, so the new provider must be exported there as part of the implementation.
178
+
- `subagent-dispatcher.js`obtains providers through the factory but fallback logic currently toggles between Claude and Gemini; this must be generalized for Kimi/OpenAI-compatible providers.
179
+
- `.aiox-core/product/templates/aiox-ai-config.yaml`and provider README currently document only Claude/Gemini configuration.
180
+
- Existing `ai-provider-factory.test.js` covers the current factory surface but should be updated with deterministic async assertions for status/availability checks.
181
+
182
+
### Verdict
183
+
184
+
- PASS for implementation readiness.
185
+
- No blocker remains for `@dev` to implement Story 184.1.
186
+
- Required adjustment: keep #184 open until runtime implementation, tests and validation are merged.
187
+
151
188
## Definition of Done
152
189
153
190
- [ ] All ACs complete.
@@ -166,6 +203,7 @@ If the provider test lands under a different path, update this section and the F
166
203
- Identified stale `aiox-core-kimi` branch/worktree as IDE sync scope, not provider LLM scope.
167
204
- Confirmed current provider factory registers `claude` and `gemini` only.
168
205
- Verified current Kimi API docs: OpenAI-compatible base URL is `https://api.moonshot.ai/v1`, and the chat completions endpoint relative to that base URL is `/chat/completions`.
206
+
- PO validation completed on 2026-05-08 after PR #710 was merged to `main`; #184 was reopened because planning alone does not close implementation.
169
207
170
208
### Agent Model Used
171
209
@@ -187,3 +225,4 @@ If the provider test lands under a different path, update this section and the F
187
225
| Data | Agente | Mudança |
188
226
|------|--------|---------|
189
227
| 2026-05-08 | @sm / Codex | Epic/story draft criados a partir do issue #184, leitura do provider factory atual e documentação oficial Kimi API. |
228
+
| 2026-05-08 | @po / Codex | Story validada contra `origin/main`, ajustes técnicos adicionados e status movido para Ready. |
0 commit comments