stack/apps
BilalG1 7f1d563753
fix(backend): use paid z-ai/glm-4.5-air slug instead of retired :free variant (#1685)
## Problem

Sentry is reporting an `AI_APICallError` on the AI proxy path:

> This model is unavailable for free. The paid version is available now
- use this slug instead: `z-ai/glm-4.5-air`

OpenRouter discontinued the **free** tier for GLM 4.5 Air. The model
selection matrix still pinned the `:free` variant for the **dumb / slow
/ authenticated** path, so every request routed there fails.

## Fix

Drop the `:free` suffix in `apps/backend/src/lib/ai/models.ts` so it
uses the paid slug OpenRouter recommends:

```diff
-      authenticated: { modelId: "z-ai/glm-4.5-air:free" },
+      authenticated: { modelId: "z-ai/glm-4.5-air" },
```

`ALLOWED_MODEL_IDS` is derived from the matrix, so the new slug is
picked up automatically.

## Notes

- This was the only `:free` slug in the matrix; nothing else is exposed
to the same break.
- This moves a previously-free path onto paid inference (cheap model,
but no longer $0).

<!-- This is an auto-generated description by cubic. -->
---
## Summary by cubic
Switch the dumb/slow/authenticated path to the paid `z-ai/glm-4.5-air`
slug, replacing the retired `:free` variant to stop “This model is
unavailable for free” errors. Restores successful requests after
OpenRouter ended the free tier.

- **Bug Fixes**
- Updated model matrix in apps/backend/src/lib/ai/models.ts to use
`z-ai/glm-4.5-air`; `ALLOWED_MODEL_IDS` picks up the new slug
automatically.

<sup>Written for commit c354b5fcf2.
Summary will update on new commits.</sup>

<a
href="https://cubic.dev/pr/hexclave/hexclave/pull/1685?utm_source=github"
target="_blank" rel="noopener noreferrer"
data-no-image-dialog="true"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source
media="(prefers-color-scheme: light)"
srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img
alt="Review in cubic"
src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a>

<!-- End of auto-generated description by cubic. -->



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Updated the model selection for authenticated requests in one
quality/speed setting, so the app now uses the correct model ID and
accepts the updated option in allowed model lists.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-30 09:47:53 -07:00
..
backend fix(backend): use paid z-ai/glm-4.5-air slug instead of retired :free variant (#1685) 2026-06-30 09:47:53 -07:00
dashboard feat: add Project ID column to platform analytics leaderboard (#1690) 2026-06-29 18:44:13 -07:00
dev-launchpad chore: update package versions 2026-06-30 01:19:04 +00:00
e2e Make hexclave exec support local dashboard 2026-06-29 18:45:11 -07:00
hosted-components chore: update package versions 2026-06-30 01:19:04 +00:00
internal-tool chore: update package versions 2026-06-30 01:19:04 +00:00
mcp chore: update package versions 2026-06-30 01:19:04 +00:00
mock-oauth-server chore: update package versions 2026-06-30 01:19:04 +00:00
oauth-mock-server In-source unit tests (#429) 2025-02-14 11:47:52 -08:00
skills chore: update package versions 2026-06-30 01:19:04 +00:00