|
| 1 | +# 010 — Phase 1 (morph_ultra_provider) |
| 2 | + |
| 3 | +## MODIFY / NEW / DELETE map |
| 4 | + |
| 5 | +### MODIFY `src/providers/registry/model-seeds.ts` |
| 6 | + |
| 7 | +Append after the StepFun seeds (end of file): |
| 8 | + |
| 9 | +```ts |
| 10 | +// Morph Ultra plan (https://www.morphllm.com/products/ultra, verified 2026-11-13). The plan |
| 11 | +// removes the token meter on Kimi K3.1 and DeepSeek V4.1 Flash; every other Morph model bills |
| 12 | +// per token, so only Ultra rows are seeded. `morph-dsv41flash-abliterated` is Ultra-covered |
| 13 | +// only for accounts approved for privileged access (403 otherwise) and is therefore not seeded. |
| 14 | +export const MORPH_ULTRA_MODELS = ["morph-kimik31", "morph-dsv41flash-1017"]; |
| 15 | +export const MORPH_ULTRA_CONTEXT_WINDOW = 1_048_576; |
| 16 | +export const MORPH_ULTRA_MODEL_CONTEXT_WINDOWS: Record<string, number> = Object.fromEntries( |
| 17 | + MORPH_ULTRA_MODELS.map(id => [id, MORPH_ULTRA_CONTEXT_WINDOW]), |
| 18 | +); |
| 19 | +export const MORPH_ULTRA_MODEL_INPUT_MODALITIES: Record<string, string[]> = Object.fromEntries( |
| 20 | + MORPH_ULTRA_MODELS.map(id => [id, ["text", "image"]]), |
| 21 | +); |
| 22 | +// Kimi K3.1 documents none/low/medium/high/xhigh/max; DeepSeek V4.1 Flash documents |
| 23 | +// none/low/high/xhigh/max and folds medium into high. |
| 24 | +export const MORPH_ULTRA_REASONING_EFFORTS: Record<string, string[]> = { |
| 25 | + "morph-kimik31": ["none", "low", "medium", "high", "xhigh", "max"], |
| 26 | + "morph-dsv41flash-1017": ["none", "low", "high", "xhigh", "max"], |
| 27 | +}; |
| 28 | +export const MORPH_ULTRA_REASONING_EFFORT_MAPS: Record<string, Record<string, string>> = { |
| 29 | + "morph-dsv41flash-1017": { minimal: "low", medium: "high" }, |
| 30 | +}; |
| 31 | +``` |
| 32 | + |
| 33 | +### MODIFY `src/providers/registry/entries-extended.ts` |
| 34 | + |
| 35 | +1. Add the five new names to the `model-seeds` import block (place them after |
| 36 | + `STEPFUN_REASONING_EFFORTS`). |
| 37 | +2. Insert a new entry between the `moonshot` entry and the `huggingface` entry: |
| 38 | + |
| 39 | +```ts |
| 40 | + { |
| 41 | + // Morph Ultra plan (https://www.morphllm.com/products/ultra, verified 2026-11-13): one |
| 42 | + // subscription, no token meter, on Kimi K3.1 and DeepSeek V4.1 Flash. Only those Ultra rows |
| 43 | + // are seeded — every other Morph model bills per token, and the abliterated variant needs |
| 44 | + // privileged-access approval. Discovery stays off so the picker cannot re-add per-token rows. |
| 45 | + id: "morph", label: "Morph (Ultra plan)", baseUrl: "https://api.morphllm.com/v1", |
| 46 | + adapter: "openai-chat", authKind: "key", |
| 47 | + dashboardUrl: "https://www.morphllm.com/dashboard/api-keys", |
| 48 | + defaultModel: "morph-dsv41flash-1017", |
| 49 | + models: MORPH_ULTRA_MODELS, |
| 50 | + liveModels: false, |
| 51 | + modelContextWindows: MORPH_ULTRA_MODEL_CONTEXT_WINDOWS, |
| 52 | + modelInputModalities: MORPH_ULTRA_MODEL_INPUT_MODALITIES, |
| 53 | + modelReasoningEfforts: MORPH_ULTRA_REASONING_EFFORTS, |
| 54 | + modelReasoningEffortMap: MORPH_ULTRA_REASONING_EFFORT_MAPS, |
| 55 | + note: "...", |
| 56 | + }, |
| 57 | +``` |
| 58 | + |
| 59 | +### MODIFY `src/usage/expected-prices.ts` |
| 60 | + |
| 61 | +Add a `MORPH_ULTRA_PRICING` source constant and two `verified-derived` overlay rows |
| 62 | +(`morph/morph-kimik31` 2.50/14.00/0.29/0, `morph/morph-dsv41flash-1017` 0.12/0.80/0.008/0), |
| 63 | +noting the Ultra subscription bills no per-token rate and these are list-price estimates. |
| 64 | + |
| 65 | +### MODIFY `tests/providers/provider-registry-parity.test.ts` |
| 66 | + |
| 67 | +Add `"morph"` after `"moonshot"` in `EXPECTED_KEY_PROVIDER_IDS`. |
| 68 | + |
| 69 | +### NEW `tests/providers/morph-ultra-provider.test.ts` |
| 70 | + |
| 71 | +Cases: registry row shape; exactly the two Ultra models; 1M window and text+image; reasoning |
| 72 | +ladders and the DeepSeek medium->high map; discovery off; price overlays resolve; routing |
| 73 | +`morph/morph-kimik31` keeps the destination. |
| 74 | + |
| 75 | +### MODIFY `scripts/test-layout/layout.json` and `tests/fixtures/test-layout-expected.json` |
| 76 | + |
| 77 | +Register `morph-ultra-provider.test.ts` -> `providers`. |
| 78 | + |
| 79 | +### MODIFY docs and structure |
| 80 | + |
| 81 | +- `docs-site/src/content/docs/guides/providers.md`: 103 -> 104, 84 -> 85; add a Morph row to |
| 82 | + the endpoint table and a short Ultra paragraph. |
| 83 | +- The seven translated guides and eight quickstarts: same count bump. |
| 84 | +- `structure/ops/docs-and-release.md`: "103 total: 84 key-based" -> "104 total: 85 key-based". |
| 85 | +- `structure/providers-and-adapters.md`: note the Morph preset's Ultra-only roster. |
| 86 | + |
| 87 | +## TESTS |
| 88 | + |
| 89 | +`tests/providers/morph-ultra-provider.test.ts` (new), plus the existing parity and docs-count |
| 90 | +suites. |
| 91 | + |
| 92 | +## Verification (C) |
| 93 | + |
| 94 | +- `bun run typecheck` -> exit 0 |
| 95 | +- `bun test tests/providers/morph-ultra-provider.test.ts tests/providers/provider-registry-parity.test.ts tests/ci-workflows/docs-provider-preset-counts.test.ts tests/test-layout.test.ts` -> exit 0 |
| 96 | +- `bun run structure:check` -> exit 0 |
0 commit comments