Skip to content

Commit 1aee877

Browse files
sync model catalogs and forked models source
1 parent 0f85705 commit 1aee877

File tree

11 files changed

+349
-185
lines changed

11 files changed

+349
-185
lines changed

.github/workflows/release.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ jobs:
1616
- uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0
19+
submodules: recursive
1920
- name: Refresh models catalog
2021
run: |
21-
git fetch --depth 1 https://github.com/router-for-me/models.git main
22-
git show FETCH_HEAD:models.json > internal/registry/models/models.json
22+
git -C third_party/models fetch --depth 1 origin main
23+
git -C third_party/models checkout --detach FETCH_HEAD
24+
cp third_party/models/models.json internal/registry/models/models.json
2325
- run: git fetch --force --tags
2426
- uses: actions/setup-go@v4
2527
with:

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[submodule "third_party/models"]
2+
path = third_party/models
3+
url = https://github.com/furedericca-lab/models.git
4+
branch = main
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
## Context
2+
3+
`kimi-k2.5` previously appeared in the repository's iFlow model catalog during the pre-migration static data era, but it is absent from the active network-refreshed catalog in `internal/registry/models/models.json`. The user requested restoring `kimi-k2.5` under `iflow`.
4+
5+
## Findings
6+
7+
- The active runtime catalog source is `internal/registry/models/models.json`.
8+
- Git history shows `kimi-k2.5` previously existed under iFlow static data.
9+
- The current catalog still exposes `kimi-k2.5` under the standalone `kimi` provider.
10+
- The current iFlow thinking applier does not define provider-specific thinking behavior for Kimi models, so restoring the model entry should not claim unsupported thinking semantics.
11+
12+
## Goals / Non-goals
13+
14+
Goals:
15+
- Restore `kimi-k2.5` to the active `iflow` model catalog.
16+
- Keep the change minimal and auditable.
17+
18+
Non-goals:
19+
- Do not change standalone `kimi` provider definitions.
20+
- Do not introduce new iFlow-specific thinking behavior for Kimi models without protocol evidence.
21+
- Do not regenerate or refactor the full catalog pipeline.
22+
23+
## Target files / modules
24+
25+
- `internal/registry/models/models.json`
26+
27+
## Constraints
28+
29+
- Keep JSON valid and preserve existing catalog structure.
30+
- Avoid adding metadata that suggests unsupported runtime behavior.
31+
- Use a minimal diff consistent with neighboring iFlow model entries.
32+
33+
## Verification plan
34+
35+
- Query the `iflow` model IDs from `internal/registry/models/models.json` and confirm `kimi-k2.5` is present.
36+
- Run a JSON validity check on `internal/registry/models/models.json`.
37+
- Run `git diff --check` to catch formatting or whitespace issues.
38+
39+
## Rollback
40+
41+
- Remove the restored `kimi-k2.5` object from the `iflow` array in `internal/registry/models/models.json`.
42+
43+
## Open questions
44+
45+
- Whether iFlow currently supports Kimi-specific thinking controls remains unverified and is intentionally left unchanged in this task.
46+
47+
## Implementation Notes
48+
49+
- Initial implementation restores the iFlow catalog entry only.
50+
- Follow-up implementation restores iFlow Kimi fallback thinking behavior by:
51+
- re-adding `thinking` metadata to `iflow/kimi-k2.5`
52+
- routing Kimi model IDs through the iFlow `enable_thinking` fallback branch
53+
- adding focused unit coverage for the Kimi fallback applier path
54+
55+
## Execution Status
56+
57+
- Completed: restored `kimi-k2.5` to the active `iflow` catalog in `internal/registry/models/models.json`.
58+
- Completed: restored iFlow Kimi fallback thinking handling in `internal/thinking/provider/iflow/apply.go`.
59+
- Completed: added focused Kimi fallback tests in `internal/thinking/provider/iflow/apply_test.go`.
60+
- Completed: verified repository task docs with the repo-task-driven validation scripts.
61+
62+
## Evidence
63+
64+
- `bash /root/.openclaw/workspace/skills/repo-task-driven/scripts/doc_placeholder_scan.sh /root/work/CLIProxyAPIPlus/docs/iflow-kimi-k2-5`
65+
- `bash /root/.openclaw/workspace/skills/repo-task-driven/scripts/post_refactor_text_scan.sh /root/work/CLIProxyAPIPlus/docs/iflow-kimi-k2-5 /root/work/CLIProxyAPIPlus/README.md`
66+
- `jq -e '.iflow | map(.id) | index("kimi-k2.5") != null' /root/work/CLIProxyAPIPlus/internal/registry/models/models.json`
67+
- `jq -e '.iflow[] | select(.id == "kimi-k2.5") | .thinking.levels | index("high") != null' /root/work/CLIProxyAPIPlus/internal/registry/models/models.json`
68+
- `jq -e '.' /root/work/CLIProxyAPIPlus/internal/registry/models/models.json`
69+
- `git -C /root/work/CLIProxyAPIPlus diff --check`
70+
71+
## Verification Gaps
72+
73+
- `go test ./internal/thinking/provider/iflow` is currently blocked in this environment because `/root/work/CLIProxyAPIPlus/go.mod` declares `go 1.26.0`, and the installed Go toolchain rejects that version string during module parsing.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
## Context
2+
3+
The user reported that Kiro also had model deletions. Historical review of `GetKiroModels()` in `internal/registry/model_definitions.go` shows the current registry still contains nearly all historical Kiro models, except for one chat-only variant that disappeared during a Kiro refactor.
4+
5+
## Findings
6+
7+
- Kiro models are defined in `internal/registry/model_definitions.go`, not in `internal/registry/models/models.json`.
8+
- Historical Kiro IDs used both dotted (`4.5`) and normalized dashed (`4-5`) naming forms during refactors.
9+
- After normalizing away dotted-to-dashed renames, the only clearly missing historical Kiro model is `kiro-claude-opus-4.5-chat`.
10+
- The model was removed in commit `204bba9d` during a Kiro refactor and was not replaced with an equivalent chat-only variant.
11+
12+
## Goals / Non-goals
13+
14+
Goals:
15+
- Restore the missing Kiro Claude Opus 4.5 chat-only variant.
16+
- Use the current normalized ID style to fit the existing registry.
17+
18+
Non-goals:
19+
- Do not revert Kiro naming normalization from dotted to dashed IDs.
20+
- Do not change the current Kiro executor behavior or dynamic model conversion logic.
21+
- Do not add speculative Kiro models without clear historical evidence.
22+
23+
## Target files / modules
24+
25+
- `internal/registry/model_definitions.go`
26+
27+
## Constraints
28+
29+
- Keep the diff minimal and consistent with neighboring Kiro model definitions.
30+
- Preserve current Kiro naming conventions (`4-5`, `4-6`, etc.).
31+
32+
## Verification plan
33+
34+
- Confirm the restored model ID is present in `GetKiroModels()`.
35+
- Run a focused text scan for the restored ID.
36+
- Run `git diff --check`.
37+
38+
## Rollback
39+
40+
- Remove the restored `kiro-claude-opus-4-5-chat` entry from `GetKiroModels()`.
41+
42+
## Open questions
43+
44+
- None for this bounded recovery task.
45+
46+
## Execution Status
47+
48+
- Completed: compared historical and current Kiro model ID sets.
49+
- Completed: restored `kiro-claude-opus-4-5-chat` in `GetKiroModels()`.
50+
51+
## Evidence
52+
53+
- `awk '/func GetKiroModels\\(\\)/,/^}/' /root/work/CLIProxyAPIPlus/internal/registry/model_definitions.go | rg 'kiro-claude-opus-4-5-chat|kiro-claude-opus-4-5|kiro-claude-opus-4-5-agentic'`
54+
- `git -C /root/work/CLIProxyAPIPlus diff --check`
55+
- `bash /root/.openclaw/workspace/skills/repo-task-driven/scripts/doc_placeholder_scan.sh /root/work/CLIProxyAPIPlus/docs/kiro-model-recovery`
56+
- `bash /root/.openclaw/workspace/skills/repo-task-driven/scripts/post_refactor_text_scan.sh /root/work/CLIProxyAPIPlus/docs/kiro-model-recovery /root/work/CLIProxyAPIPlus/README.md`
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
## Context
2+
3+
The release workflow currently refreshes `internal/registry/models/models.json` by fetching from `https://github.com/router-for-me/models.git`. The user requested switching this source to their fork and adding that fork as a git submodule in the repository.
4+
5+
## Findings
6+
7+
- The repository did not previously have a `.gitmodules` file.
8+
- The release workflow refresh step is defined in `.github/workflows/release.yaml`.
9+
- A submodule allows the repository to track the fork explicitly and makes the catalog source auditable.
10+
11+
## Goals / Non-goals
12+
13+
Goals:
14+
- Add the user's forked `models` repository as a submodule.
15+
- Update the release workflow to source `models.json` from that submodule instead of the upstream `router-for-me/models` repository.
16+
17+
Non-goals:
18+
- Do not change unrelated CI behavior.
19+
- Do not rewrite the internal registry format.
20+
21+
## Target files / modules
22+
23+
- `.gitmodules`
24+
- `third_party/models` (git submodule)
25+
- `.github/workflows/release.yaml`
26+
27+
## Constraints
28+
29+
- Keep the release workflow behavior minimal and explicit.
30+
- Use the fork URL provided by the user.
31+
32+
## Verification plan
33+
34+
- Verify `.gitmodules` contains the new fork URL and branch.
35+
- Verify the release workflow references `third_party/models`.
36+
- Verify git recognizes the submodule.
37+
38+
## Rollback
39+
40+
- Remove the submodule entry and revert the workflow refresh step to its previous state.
41+
42+
## Open questions
43+
44+
- None for this bounded task.
45+
46+
## Execution Status
47+
48+
- Completed: added `https://github.com/furedericca-lab/models.git` as the `third_party/models` submodule on branch `main`.
49+
- Completed: updated the release workflow to refresh `internal/registry/models/models.json` from the forked submodule.
50+
51+
## Evidence
52+
53+
- `.gitmodules` contains:
54+
- path `third_party/models`
55+
- url `https://github.com/furedericca-lab/models.git`
56+
- branch `main`
57+
- `git -C /root/work/CLIProxyAPIPlus submodule status`
58+
- `.github/workflows/release.yaml` now initializes submodules and copies `third_party/models/models.json`
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
## Context
2+
3+
The user asked to apply the local `iflow/kiro` model changes into the forked models source at `https://github.com/furedericca-lab/models.git`, which is now mounted as the `third_party/models` submodule.
4+
5+
## Findings
6+
7+
- The submodule repository currently contains only `models.json`.
8+
- `iflow` models are represented in that file and can be synchronized there.
9+
- `kiro` models are not stored in the submodule; they live in the main repository code at `internal/registry/model_definitions.go`.
10+
11+
## Goals / Non-goals
12+
13+
Goals:
14+
- Sync the submodule `iflow` catalog to match the current main-repo `iflow` catalog.
15+
16+
Non-goals:
17+
- Do not invent a `kiro` section inside the submodule when the source repository has no such schema.
18+
- Do not change unrelated provider catalogs.
19+
20+
## Target files / modules
21+
22+
- `third_party/models/models.json`
23+
24+
## Constraints
25+
26+
- Keep the submodule JSON valid.
27+
- Preserve the main repo's current `iflow` decisions exactly.
28+
29+
## Verification plan
30+
31+
- Compare the resulting submodule `iflow` IDs against the main repo `iflow` IDs.
32+
- Validate `third_party/models/models.json` with `jq`.
33+
- Run `git diff --check`.
34+
35+
## Rollback
36+
37+
- Revert the `third_party/models/models.json` `iflow` array to the previous submodule state.
38+
39+
## Open questions
40+
41+
- None. `kiro` remains a main-repo-only registry concern because the submodule schema does not contain it.
42+
43+
## Execution Status
44+
45+
- Completed: synced the submodule `iflow` catalog to match the main repository `iflow` catalog.
46+
- Confirmed: `kiro` changes cannot be mirrored into the submodule because the submodule schema only contains `models.json`.
47+
48+
## Evidence
49+
50+
- `jq -e '.' /root/work/CLIProxyAPIPlus/third_party/models/models.json`
51+
- `diff -u <(jq -r '.iflow[].id' /root/work/CLIProxyAPIPlus/internal/registry/models/models.json) <(jq -r '.iflow[].id' /root/work/CLIProxyAPIPlus/third_party/models/models.json)`
52+
- `git -C /root/work/CLIProxyAPIPlus diff --check`

internal/registry/model_definitions.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,18 @@ func GetKiroModels() []*ModelInfo {
607607
MaxCompletionTokens: 64000,
608608
Thinking: &ThinkingSupport{Min: 1024, Max: 32000, ZeroAllowed: true, DynamicAllowed: true},
609609
},
610+
// --- Chat Variant (No tool calling, for pure conversation) ---
611+
{
612+
ID: "kiro-claude-opus-4-5-chat",
613+
Object: "model",
614+
Created: 1732752000,
615+
OwnedBy: "aws",
616+
Type: "kiro",
617+
DisplayName: "Kiro Claude Opus 4.5 (Chat)",
618+
Description: "Claude Opus 4.5 for chat only (no tool calling)",
619+
ContextLength: 200000,
620+
MaxCompletionTokens: 64000,
621+
},
610622
// --- 第三方模型 (通过 Kiro 接入) ---
611623
{
612624
ID: "kiro-deepseek-3-2",

0 commit comments

Comments
 (0)