Skip to content

fix(#20156): Venice - add missing models and set a new model default#12964

Closed
sabrinaaquino wants to merge 14 commits intoopenclaw:mainfrom
sabrinaaquino:fix/venice-models-kimi-k25-default
Closed

fix(#20156): Venice - add missing models and set a new model default#12964
sabrinaaquino wants to merge 14 commits intoopenclaw:mainfrom
sabrinaaquino:fix/venice-models-kimi-k25-default

Conversation

@sabrinaaquino
Copy link
Copy Markdown

@sabrinaaquino sabrinaaquino commented Feb 10, 2026

What this PR fixes

We've been getting reports from Venice users on OpenClaw where they can't see certain models, most critically Kimi K2.5 (kimi-k2-5). After investigating, the root cause is that the static model catalog (used as fallback when the Venice API is unreachable) was missing several models that are live on the API. Fixes #20156

Issues addressed

  • Kimi K2.5 invisible to users — kimi-k2-5 was not in the static catalog at all. When the /models API fetch fails (timeout, network issues), users fall back to the static list and Kimi K2.5 simply doesn't exist for them.
  • Missing models from catalog — Also added claude-opus-4-6 (Claude Opus 4.6) and zai-org-glm-4.7-flash (GLM 4.7 Flash), both live on the API but absent from the fallback.
  • Default model updated — Changed from llama-3.3-70b to kimi-k2-5 (strong reasoning + vision, fully private).
  • Wrong privacy classification — kimi-k2-thinking and minimax-m21 were listed as "anonymized" but the Venice API returns them as "private". Fixed to match reality.
  • Stale context window values — Updated all models to match the live API values.
  • Discovery reliability — Increased the API timeout from 5s → 8s, added filtering for offline models, and enriched catalog entries with live context window data when the API is reachable.

Files changed (Venice-only, minimal scope)
src/agents/venice-models.ts — catalog + discovery logic
src/commands/onboard-auth.config-core.ts — default alias
docs/providers/venice.md — model tables + recommendations
docs/providers/index.md + models.md — default model refs

Note: The CI test failure in pi-embedded-helpers.isbillingerrormessage.test.ts is a pre-existing issue on main introduced by #12946, unrelated to this PR.

Greptile Summary

Adds missing Venice models (kimi-k2-5, kimi-k2-thinking, claude-opus-4-6, claude-sonnet-4-6, zai-org-glm-4.7-flash, zai-org-glm-5, minimax-m25) to the static fallback catalog, changes the default model from llama-3.3-70b to kimi-k2-5, corrects privacy classifications for kimi-k2-thinking and minimax-m21 (anonymized → private), and improves model discovery by filtering offline models, increasing the API timeout (5s → 8s), and enriching catalog entries with live context window data.

  • Default model change: llama-3.3-70bkimi-k2-5 consistently updated across code (VENICE_DEFAULT_MODEL_ID, onboard alias) and docs (index.md, models.md, venice.md).
  • Discovery hardening: Offline model filtering and model_spec null guard added. Previous review feedback about truthiness checks (!= null for availableContextTokens) and malformed entry handling (m.model_spec && guard) have been addressed.
  • Context window values: Rounded down to match live Venice API values (e.g. 131072 → 128000, 262144 → 256000).
  • Doc tables: Fully rewritten to match the updated 31-model catalog (21 private + 10 anonymized), with correct context sizes and feature flags.

Confidence Score: 4/5

  • This PR is safe to merge — it's a well-scoped data/config update with improved discovery robustness.
  • Changes are limited to a static model catalog, a default ID constant, and documentation. The discovery logic improvements (offline filtering, null guards, nullish coalescing) are correct and address prior review feedback. No behavioral regressions expected. Slight deduction because there are no tests for the Venice model discovery logic, so the new filtering/enrichment paths are only verified by inspection.
  • No files require special attention. All previous review comments have been addressed.

Last reviewed commit: 2d0780b

@openclaw-barnacle openclaw-barnacle bot added docs Improvements or additions to documentation commands Command implementations agents Agent runtime and tooling labels Feb 10, 2026
Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Feb 10, 2026

Additional Comments (1)

docs/providers/venice.md
Privacy table is inconsistent

The Privacy Modes table still lists Kimi and MiniMax under Anonymized models, but this PR moves those models into the Private section (and updates the static catalog privacy accordingly). This is a conflicting statement in the same doc and will mislead users about whether those models are fully private vs proxied; the table should be updated to match the new classification.

Prompt To Fix With AI
This is a comment left during a code review.
Path: docs/providers/venice.md
Line: 26:30

Comment:
**Privacy table is inconsistent**

The Privacy Modes table still lists `Kimi` and `MiniMax` under **Anonymized** models, but this PR moves those models into the **Private** section (and updates the static catalog privacy accordingly). This is a conflicting statement in the same doc and will mislead users about whether those models are fully private vs proxied; the table should be updated to match the new classification.

How can I resolve this? If you propose a fix, please make it concise.

- Add kimi-k2-5 (Kimi K2.5) to static catalog (was missing, causing users
  to not see it when API fetch fails)
- Add claude-opus-4-6 (Claude Opus 4.6) and zai-org-glm-4.7-flash to catalog
- Change default Venice model from llama-3.3-70b to kimi-k2-5
  (reasoning + vision, fully private)
- Fix privacy values: kimi-k2-thinking and minimax-m21 are private (not
  anonymized) per the Venice API
- Move minimax-m21 and kimi-k2-thinking to the private section
- Update context window values to match live Venice API
- Increase discovery timeout from 5s to 8s for reliability
- Filter out offline models during API discovery
- Enrich catalog entries with live context window from API
- Update docs with new model tables and default recommendations
@sabrinaaquino sabrinaaquino force-pushed the fix/venice-models-kimi-k25-default branch from 8b530e2 to 6f2d872 Compare February 10, 2026 00:50
@sabrinaaquino
Copy link
Copy Markdown
Author

@greptile-apps re-review

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Feb 10, 2026

Additional Comments (1)

src/agents/venice-models.ts
Falsy context window ignored

In the else branch for models not in the static catalog, contextWindow is set with apiModel.model_spec.availableContextTokens || 128000 (src/agents/venice-models.ts:417). If the API ever returns 0 (or another falsy value), this will incorrectly fall back to 128000, diverging from the API. Use an explicit null/undefined check here (similar to the fix already applied for catalog entries) so a present API value is always respected.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/agents/venice-models.ts
Line: 411:419

Comment:
**Falsy context window ignored**

In the `else` branch for models not in the static catalog, `contextWindow` is set with `apiModel.model_spec.availableContextTokens || 128000` (src/agents/venice-models.ts:417). If the API ever returns `0` (or another falsy value), this will incorrectly fall back to `128000`, diverging from the API. Use an explicit null/undefined check here (similar to the fix already applied for catalog entries) so a present API value is always respected.

How can I resolve this? If you propose a fix, please make it concise.

@sabrinaaquino
Copy link
Copy Markdown
Author

@greptile-apps re-review

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@sabrinaaquino
Copy link
Copy Markdown
Author

@greptile-apps re-review

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Feb 10, 2026

Additional Comments (1)

src/agents/venice-models.ts
Unsafe cast may crash

const data = (await response.json()) as VeniceModelsResponse; is used without validating the shape before accessing data.data/m.model_spec (e.g. data.data.filter(...)). If the Venice API returns a non-object (or an error payload) with HTTP 200, this will throw and force a full fallback to the static catalog. Consider a minimal runtime guard (e.g. ensure data is an object and data.data is an array of objects) before iterating so discovery remains robust.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/agents/venice-models.ts
Line: 377:384

Comment:
**Unsafe cast may crash**

`const data = (await response.json()) as VeniceModelsResponse;` is used without validating the shape before accessing `data.data`/`m.model_spec` (e.g. `data.data.filter(...)`). If the Venice API returns a non-object (or an error payload) with HTTP 200, this will throw and force a full fallback to the static catalog. Consider a minimal runtime guard (e.g. ensure `data` is an object and `data.data` is an array of objects) before iterating so discovery remains robust.

How can I resolve this? If you propose a fix, please make it concise.

@sabrinaaquino
Copy link
Copy Markdown
Author

@greptile-apps re-review

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@sabrinaaquino
Copy link
Copy Markdown
Author

@greptile-apps re-review

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Feb 10, 2026

Additional Comments (1)

src/agents/venice-models.ts
Type mismatch can crash

VeniceModelsResponse types data as VeniceModel[] with required model_spec (interface VeniceModel { ... model_spec: VeniceModelSpec; }), but the runtime code explicitly handles missing model_spec (filter((m) => m.model_spec && ...)). This mismatch makes it easy to introduce unsafe dereferences later because TypeScript will assume model_spec is always present. To keep the static typing aligned with actual API behavior, make model_spec optional in VeniceModel (and then rely on the existing m.model_spec && ... narrowing) or otherwise adjust the types so missing model_spec is represented.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/agents/venice-models.ts
Line: 346:353

Comment:
**Type mismatch can crash**

`VeniceModelsResponse` types `data` as `VeniceModel[]` with required `model_spec` (`interface VeniceModel { ... model_spec: VeniceModelSpec; }`), but the runtime code explicitly handles missing `model_spec` (`filter((m) => m.model_spec && ...)`). This mismatch makes it easy to introduce unsafe dereferences later because TypeScript will assume `model_spec` is always present. To keep the static typing aligned with actual API behavior, make `model_spec` optional in `VeniceModel` (and then rely on the existing `m.model_spec && ...` narrowing) or otherwise adjust the types so missing `model_spec` is represented.

How can I resolve this? If you propose a fix, please make it concise.

@sabrinaaquino sabrinaaquino changed the title fix(venice): add Kimi K2.5 + missing models, set as default, fix catalog fix(venice): Add missing models and set a new model default Feb 18, 2026
@sabrinaaquino sabrinaaquino changed the title fix(venice): Add missing models and set a new model default fix(#20156): Venice - add missing models and set a new model default Feb 18, 2026
@sabrinaaquino
Copy link
Copy Markdown
Author

@greptile-apps re-review

@vincentkoc vincentkoc self-assigned this Mar 7, 2026
@vincentkoc
Copy link
Copy Markdown
Member

Quick status after #38306 merged: the catalog-sync, live metadata hardening, and Venice default-onboarding breakages (max_completion_tokens / unsupported tools) are now fixed on main.

What still appears unique in this PR is the product decision to switch the default Venice model to kimi-k2-5, plus the matching docs/recommendation updates. I’m leaving this open for that narrower follow-up instead of closing it as a duplicate.

If we keep this path, the next step should be to trim the PR to only the remaining default-model/docs delta so it’s easy to review against what already shipped.

@vincentkoc
Copy link
Copy Markdown
Member

The remaining value from this PR has now landed in #38423.

#38306 already covered the Venice catalog/discovery hardening and default-setup breakages; #38423 carried the follow-up default-model switch to kimi-k2-5, the onboard alias update, the Venice docs refresh, and the changelog credit path for this contribution.

I’m closing this PR as superseded to keep one canonical merged path for the Venice cleanup. Thanks again for the original report and implementation direction here.

@vincentkoc vincentkoc closed this Mar 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling commands Command implementations docs Improvements or additions to documentation size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Venice provider - update model catalog

2 participants