- Task 3: Revert fallback object to {provider, modelId} only; adding id/api
would trick resolveModel into using a fake Model with wrong api field
- Task 1: Import beforeEach/afterEach in test file; consolidate describe block
- Task 5: Add explicit initialState modification with concrete code
- Task 7: Reduce to E2E verification only; remove vague grep instructions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Two doctor tests (reload-fresh-config, auto-fallback to non-stream) let
fetchModelsFromServiceBaseUrl call the real OpenAI /models URL because
no fetch stub was installed. The live endpoint returned 401, which
short-circuited probeServiceCapabilities before createLLMClient or
chatCompletion ran, so the assertions on those mocks failed.
Stubs fetch with a 404 response in both tests so the probe falls
through to the chatCompletion path. Also relaxes the maxTokens
assertion in the reload test, since the production probe uses 2048
(matching the rest of the chatCompletion call sites).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The revise_chapter tool and sub_agent(agent="reviser") both wrapped the
same pipeline.reviseDraft() call with an almost-identical parameter set.
Listing both in the system prompt made the model oscillate between them.
Removes createReviseChapterTool, its export, registration, and tests.
Updates the system prompt and edit/write tool descriptions to point at
sub_agent(reviser) for whole-chapter rewrites.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Users on slow npm mirrors (taobao/cnpm/etc.) hit
'No matching version found for @mariozechner/pi-ai@^0.67.4' when
running 'npm install -g @actalk/inkos@latest'. The caret range in
inkos-core ('^0.67.1') resolves to pi-agent-core@0.67.4, whose own
package.json tightens pi-ai to '^0.67.4'. If the mirror has not yet
synced pi-ai@0.67.4, the install breaks.
Add npm 'overrides' to packages/cli/package.json (the published root)
and pnpm.overrides to the workspace root so both end-user installs
and local dev pin to a known-good version. Bumping pi-mono now
becomes a deliberate edit rather than an automatic, mirror-dependent
upgrade.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The generic edit and write tools were described abstractly. Spell out
when to reach for specialised tools instead — patch_chapter_text for
chapter text, write_truth_file for canonical truth files,
revise_chapter for chapter revisions — so the agent stops overwriting
chapters or truth files with the generic tools.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Extend SubAgentParams schema with explicit architect params (genre,
platform, language, targetChapters) so the architect agent stops
hardcoding initBook config. Auditor now returns issue severity +
description list. Reviser reads mode directly from the schema instead
of regex-matching the instruction. System prompt and tests are updated
in lockstep with the schema.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Services like PPIO (71 models) and SiliconFlow (111 models) were
truncated to 50. Return the full list.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When discoveredModels is empty and probe succeeds, return the full
knownModels list (7 for MiniMax) instead of just the probed model.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
buildModelCandidates prioritized the global configModel (kimi-k2.5)
over service-specific models, causing MiniMax probe to try kimi-k2.5
on MiniMax's endpoint. Now uses knownModels[0] as preferredModel
for services that have them.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
f942c84 changed GET /models to call probeServiceCapabilities which does
chat completion testing — causing zhipu to take 97s and minimax 47s.
GET /models only needs the model list, not a full API health check.
Reverted to simple /models fetch + pi-ai fallback.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
MiniMax GET /models took 47s because it tried the Anthropic endpoint
(no /models) and waited for timeout. Services with knownModels now
return the hardcoded list immediately, skipping the network call.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Previously auditor and reviser always operated on the latest chapter.
Now the agent can pass an explicit chapterNumber so "重写第5章" targets
chapter 5 instead of always hitting the latest.
- Added chapterNumber to SubAgentParams schema
- auditor: pipeline.auditDraft(bookId, chapterNumber)
- reviser: pipeline.reviseDraft(bookId, chapterNumber, mode)
- Updated system prompt to document the parameter
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>