Conversation
Refresh providers/nearai against the live gateway model list (https://cloud-api.near.ai/v1/models, checked 2026-09-08). - Add 19 models now served by the gateway: GLM 5.2, GLM 5.3 Flash, DeepSeek V4 Flash and Qwen 3.8 27B on NEAR TEE hosts, plus the pass-through routes for Claude Fable 5/5.1, Opus 4.8, Opus 5, Sonnet 5, GPT-5.6 Luna/Sol, GPT-6 Astra, Gemini 3.8 Flash, Kimi K2.6/K3, DeepSeek V3.2, Qwen3 32B, Qwen3.5 397B and Qwen3.7 Max. - Remove 5 models the gateway no longer lists: gemini-3-pro, gemma-4-31B-it, gpt-oss-120b, Qwen3-30B-A3B-Instruct-2507, Qwen3.5-122B-A10B. - Fix prices for GLM-5.1-FP8, gpt-5.2 and claude-sonnet-4-5. - Convert GLM-5.1-FP8 to base_model = "zhipuai/glm-5.1". - Fix Qwen3-VL-30B limits to the served max_model_len (16 384). - NEAR-hosted TEE entries carry a " TEE" name suffix and a release_date/last_updated of the TEE catalog refresh, following the Chutes TEE convention, so they sort first in date-ordered pickers. Reasoning controls were verified live against the gateway: GLM 5.2 / 5.3 Flash / Qwen 3.8 toggle with chat_template_kwargs.enable_thinking; DeepSeek V4 Flash (off by default) and Kimi K3 toggle with chat_template_kwargs.thinking.
…obes Addresses the reviewer findings on anomalyco#6584. Every value below was measured on POST https://cloud-api.near.ai/v1/chat/completions on 2026-09-08. - qwen3.5-397b-a17b: reasoning is on by default and toggles with chat_template_kwargs.enable_thinking. The route also accepts image input, so the incorrect text-only modality override and attachment = false are dropped in favour of the lab metadata. - deepseek-v3.2: reasoning is off by default and toggles with chat_template_kwargs.thinking. - qwen3.7-max: reasoning_options stays empty, now with the evidence in the header. No reasoning_content is returned under enable_thinking, thinking, reasoning_effort, reasoning.enabled or reasoning.effort. - qwen3-32b: removed. The gateway advertises the route but every request returns "The model is currently unavailable". - Claude Fable 5, Fable 5.1, Opus 4.8, Opus 5 and Sonnet 5: reasoning_options is empty. These routes reject thinking.type = "enabled" and reject reasoning_effort as an extra input, and the OpenRouter-style reasoning object is accepted but returns no reasoning_content. Declaring an effort scale would make clients send a parameter the gateway rejects outright. - Modality overrides now remove only pdf, which the gateway cannot accept in any form, and inherit every other input type from the lab entry. Gemini 3.8 Flash keeps video and audio, the Moonshot entries inherit unchanged. - Every toggle in the changed set carries a leading wire-path comment. OpenAI routes are unchanged: reasoning_effort is accepted there.
Addresses review round 2 on anomalyco#6584. The gateway's own /v1/models input_modalities field proved unreliable in both directions, so each route was probed with a two-pixel test image (left green, right orange) alongside a control request with the same prompt and no image. A route is credited with image input only when the image answer is correct and the control answer differs and is wrong. Routes that silently drop images despite advertising them: - moonshotai/kimi-k2.6 and kimi-k3 both mis-describe the image, and both say they cannot see images when none is attached. Now text-only. Routes that accept images despite advertising text only: - qwen3.5-397b-a17b, Qwen3.6-35B-A3B-FP8 and Qwen3.8-27B each named both colours exactly while their controls guessed wrong. Now text and image. Also narrowed gemini-3.8-flash and glm-5.3-flash to text and image. Video and audio were never verified on any route, so they are excluded everywhere; with audio gone from gemini-3.8-flash there is no audio input to price, so cost.input_audio is intentionally absent. deepseek-ai/DeepSeek-V4-Flash and z-ai/glm-5.2 are confirmed text-only and already match their lab bases, so they carry no override.
… output limit Addresses review round 3 on anomalyco#6584. - kimi-k2.6 and kimi-k3 set attachment = false. Both routes are text-only here, but the lab entries set attachment = true, so the resolved models were advertising file attachments on routes that silently discard images. glm-5.2 and DeepSeek-V4-Flash already inherit attachment = false and are left untouched. - GLM-5.1-FP8 keeps the inherited limit.output = 131_072 and now carries the evidence in its header instead of only in the PR thread. On this gateway max_tokens of 16384, 40000 and 131072 are all accepted, while 202752 and above are rejected with "Requested token count exceeds the model's maximum context". Validation is bounded by the 202_752 context window, which the direct endpoint reports as max_model_len, so context is overridden here and output is not. No value changed, comment only.
Contributor
Action items
|
Contributor
Action items
|
Contributor
Action items
|
Contributor
Action items
|
Contributor
Action items
|
Contributor
Action items
|
Contributor
|
No actionable findings. |
# Conflicts: # packages/core/src/sync/index.ts
Contributor
|
No actionable findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
nearaisync provider that reads the public/v1/modelscatalog oncloud-api.near.ai. The endpoint needs no credential, so this needs no repositorysecret and no change to
sync-models.yml: the sync matrix is built frombun models:sync --list-providers, so registering the provider is the wiring.This PR is the sync mechanism only. It does not refresh the
providers/nearaicatalog, and it never creates or deletes model files.
What the sync takes, and what it does not
The endpoint is authoritative for price and for the context window of models NEAR
AI serves directly. Its other fields are not, and each of these was checked
against live requests rather than read off the response:
max_output_lengthis advisory and not enforced. Onzai-org/GLM-5.1-FP8itreports 16384, while
max_tokensof 16384, 40000 and 131072 were all acceptedand only 202752 and above were rejected, with "Requested token count exceeds the
model's maximum context". The binding limit is the context window, so
limit.outputis never synced.context_lengthis the servingmax_model_lenonly whereowned_byisnearai. On relayed routes it is rounded:openai/gpt-4.1reports 1000000against the lab entry's 1047576. So context is synced for hosted models only,
and taken as the lower of the two values.
supported_featuresis wrong in both directions. It listsreasoningfor theClaude relay routes, where
thinking.typeandreasoning_effortare rejectedand the accepted
reasoningobject returns noreasoning_content; it omitsreasoningfor others that plainly reason. No capability is taken from it.input_modalitiesadvertises image input for the Moonshot routes, which rejectit. It also reports an
embeddingmodality the schema has no value for.Capabilities, modalities,
attachment,interleavedand reasoning controlstherefore stay hand-authored, and a follow-up PR carries the catalog data.
Safety
skipCreates: new models are not created, because the endpoint exposes norelease date or knowledge cutoff and most NEAR AI models reason, so they need
hand-authored controls.
deleteMissing: false: absence never removes a model. A truncated responsewould be indistinguishable from a genuine withdrawal.
trackMissingModels: false: remote-only models are listed in the sync noticerather than filed as one issue each.
aborting the run for every other model.
Checks
Re-run against
devat385d8f5f5, which this branch now merges cleanly with.bun validate- exit 0bun test packages/core/test/nearai.test.ts- 18 passedbun models:sync nearai --dry-run- 0 created, 1 updated, 0 removed,31 unchanged, and one retained (
zai-org/GLM-5.1-FP8, absent from the livecatalog and kept by
deleteMissing: false)bun test- the same 4 unrelated failures reproduced ondevat385d8f5f5