Skip to content

feat(providers): add Phala - #11447

Open
kingsleydon wants to merge 1 commit into
anomalyco:devfrom
Phala-Network:feat/phala-provider
Open

kingsleydon wants to merge 1 commit into
anomalyco:devfrom
Phala-Network:feat/phala-provider

Conversation

@kingsleydon

@kingsleydon kingsleydon commented Oct 25, 2026 •

Copy link
Copy Markdown

Phala provides OpenAI-compatible Chat Completions at https://inference.phala.com/v1 using PHALA_AI_API_KEY; Kev 4B uses POST /v1/systemone. All 21 entries are cataloged as TEE-backed; /v1/aci/attestation attests the gateway, not each inference response.

Entries

20 Chat Completions models and one v2-only System One model use base_model with host overrides; Kev 4B adds a complete shared lab definition. Costs are USD/MTok.

Model ID base_model Cost in / out / cache read Reasoning Limit deltas vs lab
deepseek/deepseek-v3.2 deepseek/deepseek-v3.2 1 / 1 / 0.5 toggle context 163,840 (lab 128,000)
deepseek/deepseek-v4-flash-0731 deepseek/deepseek-v4-flash-0731 0.44 / 1.32 / 0.028 toggle + low/high/max context 1,048,576 (lab 1,000,000); output 393,216 (lab 384,000)
deepseek/deepseek-v4.1-flash-1017 deepseek/deepseek-v4.1-flash-1017 0.75 / 1.6 / 0.15 toggle + low/high/max context 1,048,576 (lab 1,000,000); output 393,216 (lab 384,000)
google/gemma-4-31b-it google/gemma-4-31b-it 0.15 / 0.46 / 0.075 toggle —
jaredpalmer/kev-4b jaredpalmer/kev-4b 0.042 / 0 / — — (decision) context 8,192 (lab 65,536)
meta-llama/llama-3.3-70b-instruct meta/llama-3.3-70b-instruct 2 / 2 / — — context 131,072 (lab 128,000); output 16,384 (lab 4,096)
moonshotai/kimi-k2.6 moonshotai/kimi-k2.6 1.09 / 4.6 / 0.37 toggle —
moonshotai/kimi-k3 moonshotai/kimi-k3 3 / 15 / 0.3 toggle + low/high/max —
openai/gpt-oss-120b openai/gpt-oss-120b 0.15 / 0.6 / — low/medium/high —
qwen/qwen-2.5-7b-instruct alibaba/qwen2.5-7b-instruct 0.1 / 0.2 / — — context 32,768 (lab 131,072)
qwen/qwen3-32b alibaba/qwen3-32b 0.12 / 0.5 / 0.052 toggle + budget context 40,960 (lab 131,072)
qwen/qwen3-vl-30b-a3b-instruct alibaba/qwen3-vl-30b-a3b-instruct 0.2 / 0.7 / 0.03 — context 128,000 (lab 262,144)
qwen/qwen3.5-27b alibaba/qwen3.5-27b 0.3 / 2.4 / 0.03 toggle —
qwen/qwen3.5-397b-a17b alibaba/qwen3.5-397b-a17b 0.55 / 3.5 / 0.225 toggle —
qwen/qwen3.6-27b alibaba/qwen3.6-27b 0.32 / 3.25 / 0.03 supported; no controls —
qwen/qwen3.6-35b-a3b alibaba/qwen3.6-35b-a3b 0.2 / 1.27 / 0.056 toggle —
qwen/qwen3.8-27b alibaba/qwen3.8-27b 0.2 / 2.5 / 0.05 toggle + low/medium/xhigh + budget; default xhigh context 1,000,000 (lab 262,144); output 262,144 (lab 32,768)
z-ai/glm-5.1 zhipuai/glm-5.1 1.21 / 4.2 / 0.6 supported; no controls context 202,752 (lab 200,000); output 128,000 (lab 131,072)
z-ai/glm-5.2 zhipuai/glm-5.2 1.26 / 3 / 0.22 high/max context 1,048,576 (lab 1,000,000)
z-ai/glm-5.3-flash zhipuai/glm-5.3-flash 0.15 / 0.5 / 0.03 low/high/max context 1,048,576 (lab 1,000,000)
z-ai/glm-5.3 zhipuai/glm-5.3 1.4 / 4.4 / 0.26 low/high/max context 1,048,576 (lab 1,000,000)

Reasoning controls

Controls follow native provider entries and relay peers. The leading model comments record the host probes used for deviations (Chat Completions, max_tokens=256, 2026-10-25); these bounded probes do not establish behavior for every prompt.

  • reasoning.enabled=false and reasoning_effort=none still returned non-empty reasoning_content on all 3 prompts for GLM 5.1 and Qwen3.6 27B (256 reasoning tokens each). GLM 5.2 off returned 258/256/257; none returned 256/261/258. The off requests still reasoned in those probes. GLM 5.1 has no native graded effort and declares support only.
  • reasoning_effort: native/peer sets are shown in the table; model headers record acceptance of DeepSeek V4 low/high/max. GLM 5.3/Flash use effort only, matching their native provider entries. The gateway source confirms reasoning.effort as an alias; the alias was not separately live-tested.
  • reasoning.max_tokens: the Qwen3.8 header records an accepted 64-token budget producing 2 reasoning tokens, while no-effort/xhigh both produced 193. The gateway rejects 0; other numeric bounds are unverified and left unspecified. Qwen3 32B keeps the native baseline; its recorded effect test was inconclusive (about 1 token even without a budget).
  • Budgets 16 and 128 produced ~256 reasoning tokens on all 3 recorded prompts for Qwen3.5 27B/397B and Qwen3.6 35B, matching the no-budget probes; budget controls remain absent. Qwen3.6 27B requests with reasoning.max_tokens=64 were rejected with HTTP 400 on 3/3 prompts.

[api.chat-completions] compatibility = { reasoning_field = "reasoning_content" } follows Chutes peers on 16 reasoning models. Live checks on 2026-10-25 (max_tokens=256, 10/10 requests HTTP 200):

  • DeepSeek V3.2 and Qwen3.8 returned non-empty reasoning_content (117/3 characters); GLM 5.3 and Kimi K2.6 forced tool-call messages included empty reasoning_content/reasoning fields, so those two probes establish field presence and replay acceptance only.
  • All four assistant messages were replayed with their reasoning_content, tool calls and tool results: 4/4 follow-ups accepted, including 2/2 non-empty reasoning replays.
  • GPT-OSS returned non-empty reasoning and no reasoning_content in 2/2 requests. Its compatibility field stays unset: v1 interleaved.field permits only reasoning_content/reasoning_details (same limitation as the Nebius DeepSeek V4.1 peer). GLM 5.1 and Qwen3.6 27B also returned non-empty reasoning_content in the off-control probes above. The other 10 reasoning models follow peers; their response field was not individually probed.

Catalog input_modalities is text,image for Kimi K2.6/Qwen3 VL and text,image,video for GLM 5.3 Flash. MIME types follow the lab: GLM 5.3 Flash keeps video/mp4, video/x-matroska and video/quicktime; Kimi K2.6/Qwen3 VL remain text/image. None lists PDF, so PDF is omitted. Qwen3 VL's catalog output 32,768 matches its inherited lab value. Context-equal output caps inherit the lab; Qwen2.5 output is 8,192.

Sources

Notes for reviewers

  • [modalities] in kimi-k2.6, qwen3-vl-30b-a3b-instruct and glm-5.3-flash narrows input to the host catalog. output = ["text"] is required because ModalitiesV2 requires both arrays and modelV2ToV1 validates provider TOML before base_model inheritance (packages/core/src/schema-v2.ts, packages/core/src/translate.ts).

Validation

bun validate and git diff --check pass. bun run v1:check was not run. An equivalent in-place comparison used the repository's generateCatalog, filterCatalogByModelType and MODEL_TYPES, matching the generation in packages/core/script/v1-check.ts, to compare all 22 v1 views against dev 7cd04230c.

The baseline was generated with the two newly added catalog directories temporarily held outside the catalog and restored in finally; all other tracked files matched dev. Only api, api-all and api-chat change, adding Phala and its 20 Chat Completions models. Existing providers, models and fields are unchanged. Phala's Kev lab/provider entries are v2-only and absent from v1. No additional Git worktree was created.

The two uncensored variants (phala/gemma-4-26b-a4b-uncensored and phala/qwen3.8-27b-uncensored) are excluded; Responses/Messages are deferred.

🤖 Generated with Claude Code

@kingsleydon
kingsleydon marked this pull request as draft October 25, 2026 07:03
@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/phala/models/qwen/qwen3.8-27b.toml:13 - Check: Relay reasoning controls must copy lab + same-surface peer effort set, not omit graded effort from uncertainty. Why: File claims toggle only while its own header says catalog lists reasoning / reasoning_effort, native alibaba/qwen3.8-27b exposes toggle + low|medium|xhigh + budget, and openrouter/qwen3.8-27b exposes none|low|medium|xhigh; same omission pattern appears in glm-5.1, glm-5.2 and kimi-k2.6 which also cite reasoning_effort then omit effort. Action: Verify live/docs whether Phala forwards reasoning.effort/reasoning_effort for these routes and add peer-supported effort or cite host proof that only reasoning.enabled exists.
  • [high] [possible mistake] providers/phala/models/google/gemma-4-31b-it.toml:16 - Check: limit.output must be the host-served max. Why: Lab is 32_768 and chutes/google/gemma-4-31B-turbo-TEE is 65_536; PR claims 262_144 (8x lab, 4x peer) with no peer/catalog support, likely context/output confusion that inflates v1 limit.output. Action: Verify against catalog max_output_tokens/max_completion_tokens and correct or cite exact field.
  • [high] [possible mistake] providers/phala/models/qwen/qwen3.6-27b.toml:15 - Check: limit.output accuracy. Why: Lab is 65_536; PR claims 262_140 (off-by-4 typo for 262_144, 4x lab); same 262_144 appears in qwen3.5-397b-a17b, qwen3.6-35b-a3b vs labs 65_536 and OpenRouter 235_929, and qwen3.8-27b claims 262_144 vs lab 32_768. Action: Fix typo and verify all four Qwen outputs against catalog, correcting to verified maxima.
  • [high] [possible mistake] providers/phala/models/z-ai/glm-5.3.toml:23 - Check: limit.output must be host-served max. Why: Lab is 131_072 and all peers (tinfoil/glm-5-3, privatemode-ai/glm-5.3, nearai/z-ai/glm-5.3) inherit 131_072 with no output override; PR claims 1_048_576 equalling context (8x). Action: Verify catalog output cap and correct to verified value.
  • [medium] [possible mistake] providers/phala/models/moonshotai/kimi-k3.toml:16 - Check: Sampling overrides must be real host deltas. Why: Lab fixes temperature/top_p/top_k=false, native moonshotai/kimi-k3 keeps them fixed and chutes/moonshotai/Kimi-K3-TEE enables only temperature=true; PR enables all three true with only catalog supported_sampling_parameters as evidence and no live test. Action: Verify Phala accepts top_p/top_k on this route or drop to peer-supported set.
  • [medium] [possible mistake] providers/phala/models/deepseek/deepseek-v4.1-flash-1017.toml:15 - Check: Sampling deltas must match host API. Why: Native deepseek/deepseek-flash sets only top_k=false (keeps top_p=true); PR sets both top_p=false and top_k=false with header admitting not listed in catalog supported_parameters; not live-tested. Action: Verify docs/live that Phala rejects top_p or inherit top_p from lab.
  • [medium] [possible mistake] providers/phala/models/z-ai/glm-5.3-flash.toml:13 - Check: Modalities and effort must match host surface. Why: Lab includes application/pdf, privatemode-ai/glm-5.3-flash narrows to text+image/jpeg|png and nearai/z-ai/glm-5.3-flash to text+2 images; PR keeps video/* but drops pdf unexplained, and claims effort low|high|max while its header says catalog lists only reasoning (no reasoning_effort) and not live-tested. Action: Verify image/video/pdf support and reasoning_effort forwarding on Phala and align modalities/effort or cite.
  • [low] [possible mistake] providers/phala/models/deepseek/deepseek-v3.2.toml:16 - Check: Limits and cache.implicit need host evidence. Why: PR claims context 163_840 vs lab 128_000 and Chutes peer 131_072, llama-3.3-70b claims output 16_384 vs lab 4_096 with no peer support, and 14/20 files claim cache={implicit=true} with no caching docs cited, only the models catalog. Action: Cite catalog/docs fields for the divergent limits and caching behavior or correct to verified values.

@kingsleydon
kingsleydon marked this pull request as ready for review October 25, 2026 07:15
@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [possible mistake] providers/phala/models/qwen/qwen3.6-27b.toml:12 - Check: Served output limit vs lab/peer values. Why: output = 262_140 is 4x the lab 65_536 (models/alibaba/qwen3.6-27b.toml) and off-by-4 from the 262_144 used for every other Phala full-context output, indicating a transcription typo rather than a measured host cap. Action: Verify against https://inference.phala.com/v1/models and fix to the catalog's max_output_tokens or remove if it inherits the lab value.
  • [high] [possible mistake] providers/phala/models/qwen/qwen3.8-27b.toml:13 - Check: Served context/output vs lab and native controls. Why: context = 1_000_000 / output = 262_144 vs lab 262_144 / 32_768 (models/alibaba/qwen3.8-27b.toml); Alibaba native (providers/alibaba/models/qwen3.8-27b.toml) keeps 262_144 context and Chutes/NEAR peers keep lab context with 65_536 or no output override — a 4x context inflation plus 8x output with output-equals-context pattern matches a context/output confusion. Action: Confirm Phala's actual context_length and max_output_tokens and correct both fields.
  • [high] [possible mistake] providers/phala/models/google/gemma-4-31b-it.toml:13 - Check: Served output limit vs lab. Why: output = 262_144 equals the full lab context (models/google/gemma-4-31b-it.toml: context 262_144 / output 32_768) while the cited relay baseline (providers/chutes/models/google/gemma-4-31B-turbo-TEE.toml) serves 65_536; full-context output is implausible without host proof. Action: Verify Phala's output cap and correct to the catalog value or inherit the lab value.
  • [high] [possible mistake] providers/phala/models/z-ai/glm-5.3.toml:14 - Check: Served output limit vs lab/native. Why: output = 1_048_576 vs lab 131_072 (models/zhipuai/glm-5.3.toml) and Zhipu native with no output override (providers/zhipuai/models/glm-5.3.toml); same output-equals-context pattern appears in qwen3.5-397b-a17b.toml (262_144 vs lab 65_536) and qwen3.6-35b-a3b.toml (262_144 vs lab 65_536) where Chutes/NEAR/Alibaba peers keep 65_536 or small caps. Action: Verify Phala's max_output_tokens for these three routes and correct to measured caps.
  • [medium] [possible mistake] providers/phala/models/deepseek/deepseek-v4.1-flash-1017.toml:9 - Check: Override-only sampling deltas. Why: top_p = false contradicts the lab (models/deepseek/deepseek-v4.1-flash-1017.toml: top_p true) and DeepSeek native (providers/deepseek/models/deepseek-v4-flash.toml sets only top_k = false, keeping top_p); no Phala doc in the diff proves Phala rejects top_p. Action: Remove top_p = false unless Phala docs/live rejection prove it, keeping only top_k = false.
  • [medium] [possible mistake] providers/phala/models/moonshotai/kimi-k3.toml:11 - Check: Override-only sampling deltas. Why: temperature/top_p/top_k = true flips lab false/false/false (models/moonshotai/kimi-k3.toml) where Moonshot native (providers/moonshotai/models/kimi-k3.toml) fixes temperature/top_p and NEAR relay peer keeps lab false; the only support cited is generic supported_sampling_parameters with not live-tested. Action: Verify Phala actually accepts non-default sampling on this route or remove the three overrides.
  • [medium] [possible mistake] providers/phala/models/deepseek/deepseek-v3.2.toml:2 - Check: Toggle wire path accuracy. Why: Every Phala toggle claims reasoning.enabled = true|false while all cited baselines use different paths (chat_template_kwargs.thinking, enable_thinking, thinking.type = enabled|disabled per Chutes/NEAR/DeepSeek files) and every file states not live-tested, so the exact wire comment required for toggle is unverified and contradicts peers. Action: Confirm Phala's actual on/off field from docs or a live request and correct all toggle headers, or drop toggle if no off switch exists.
  • [medium] [violation] providers/phala/models/qwen/qwen3.8-27b.toml:8 - Check: Relay reasoning baseline vs native/peer option set. Why: Alibaba native exposes toggle + effort [low,medium,xhigh] + budget (providers/alibaba/models/qwen3.8-27b.toml); Phala authors toggle alone while stating not live-tested, and the same omission recurs for qwen3-32b / qwen3.5-27b / qwen3.5-397b-a17b / qwen3.6-27b / qwen3.6-35b-a3b where natives have toggle + budget. Leaving controls out from uncertainty violates the relay rule to copy lab/peer controls. Action: Verify whether Phala forwards thinking_budget / reasoning_effort and add budget/effort or cite host proof that the route is toggle-only.
  • [low] [possible mistake] providers/phala/models/deepseek/deepseek-v3.2.toml:1 - Check: Source citation mapped to material claims. Why: All 20 files cite only the generic https://inference.phala.com/v1/models for divergent prices, limits, dropped video/PDF modalities, and cache = { implicit = true } (claimed on 17 routes, omitted on 3 with no explanation); a URL alone does not prove the disputed 4-8x limit changes or caching. Action: State in the PR body what that endpoint supports per model (price/limit/modality/cache) or add per-model doc links for the outliers above.

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/phala/models/deepseek/deepseek-v4-flash-0731.toml:9 - Check: Relay must copy native effort set for DeepSeek V4. Why: Phala is a multi-model relay; lab baseline is toggle + low/high/max (providers/deepseek/models/deepseek-v4-flash.toml:34, providers/alibaba/models/deepseek-v4-flash-0731.toml:21). File claims only toggle, dropping effort while the same gateway forwards reasoning_effort on other models. Action: Add effort = ["low", "high", "max"] with wire comment or prove with docs/live output that Phala rejects effort for this ID.
  • [high] [violation] providers/phala/models/deepseek/deepseek-v4.1-flash-1017.toml:9 - Check: Relay must copy native effort set for DeepSeek V4. Why: Same baseline as above; file is toggle-only with no effort test noted, contradicting lab/peer low/high/max. Action: Add the low/high/max effort list or provide this-host rejection evidence.
  • [high] [violation] providers/phala/models/z-ai/glm-5.1.toml:10 - Check: Do not invent effort beyond lab/peers. Why: Lab baseline is toggle-only (providers/zai/models/glm-5.1.toml:19, providers/openrouter/models/z-ai/glm-5.1.toml:11). File drops toggle and invents effort = ["low", "medium", "high"] with no matching native/peer set. Action: Replace with toggle = true unless live meaningful-effect logs for low/medium/high on this host are provided.
  • [high] [violation] providers/phala/models/z-ai/glm-5.3-flash.toml:14 - Check: Relay must not drop native effort controls from uncertainty. Why: Baselines are effort = ["low", "high", "max"] with no toggle (providers/zai/models/glm-5.3-flash.toml:18, providers/openrouter/models/z-ai/glm-5.3-flash.toml:16). File keeps only toggle, omitting the graded levels with no effort test. Action: Add effort = ["low", "high", "max"] or prove Phala rejects reasoning_effort for this ID.
  • [high] [violation] providers/phala/models/z-ai/glm-5.2.toml:10 - Check: Extra levels need live meaningful effect; do not publish inconclusive controls. Why: File claims effort = ["high", "max"] but its own header says effect comparison was inconclusive due to the 1024-token cap, and drops lab toggle (providers/zai/models/glm-5.2.toml:21). Action: Re-test with a cap that separates levels and confirm reasoning.enabled=false is truly ignored on this host, or align to toggle = true, effort = ["high", "max"].
  • [high] [violation] providers/phala/models/qwen/qwen3.8-27b.toml:10 - Check: Baseline effort is native/peer set, not invented high/max. Why: Alibaba baseline is toggle + low/medium/xhigh + budget (providers/alibaba/models/qwen3.8-27b.toml:16); OpenRouter peer is none/low/medium/xhigh (providers/openrouter/models/qwen/qwen3.8-27b.toml:12). File invents low/medium/high/max, drops xhigh/none. Action: Correct to low/medium/xhigh (+ toggle only if reasoning.enabled=false verified) or show per-level reasoning-token separation proving high/max are distinct host levels.
  • [high] [possible mistake] providers/phala/models/qwen/qwen3.6-27b.toml:8 - Check: No controls means affirmatively always-on, not untested. Why: Both baselines expose a toggle (providers/alibaba/models/qwen3.6-27b.toml:21, providers/openrouter/models/qwen/qwen3.6-27b.toml:11), and every sibling Phala Qwen file on the same reasoning.enabled gateway claims the toggle works; single-model “off ignored” contradicts the shared wire path. Action: Verify reasoning.enabled=false truly still reasons on this ID and that reasoning_effort/thinking_budget are also rejected, or add toggle = true.
  • [medium] [possible mistake] providers/phala/models/qwen/qwen-2.5-7b-instruct.toml:7 - Check: Provider file must include real limit deltas; PR body must match file. Why: Body table advertises output 32,768 vs lab 8,192, but file sets only context = 32_768 and inherits lab output 8,192. Action: Set [limit] output = 32_768 if catalog max_output_length is authoritatively 32,768, or correct the body table if the catalog value echoes context and lab 8,192 was intentionally kept.

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/phala/models/z-ai/glm-5.1.toml:17 - Check: Baseline effort = native/peer set, never invent low/medium/high. Why: Lab zhipuai/glm-5.1 is reasoning, first-party providers/zai/models/glm-5.1.toml is toggle only, providers/tensorx/models/z-ai/glm-5.1.toml is toggle only, providers/alibaba/models/glm-5.1.toml is toggle+budget; no source has low/medium/high for 5.1, yet Phala authors effort = ["low", "medium", "high"] and drops toggle. Action: Remove invented effort and restore toggle = true unless Phala docs prove a gateway effort mapping with meaningful effect beyond “accepted”; keep the top-of-file wire comment.
  • [high] [violation] providers/phala/models/z-ai/glm-5.2.toml:17 - Check: Copy underlying controls from lab + same-surface peers on relays. Why: providers/zai/models/glm-5.2.toml, providers/alibaba/models/glm-5.2.toml, and providers/tensorx/models/z-ai/glm-5.2.toml are all toggle = true + effort = ["high", "max"]; Phala drops toggle on a single “off ignored, 258 tokens” probe. Action: Restore toggle = true or provide stronger evidence the gateway does not forward reasoning.enabled/thinking.type for this ID (multiple prompts, gateway docs), not one sample.
  • [high] [possible mistake] providers/phala/models/qwen/qwen3.6-27b.toml:17 - Check: Do not leave controls out from uncertainty on relays; reasoning = { supported = true } means affirmatively always-on. Why: Native providers/alibaba/models/qwen3.6-27b.toml is toggle+budget, and same-gateway siblings qwen3.5-27b/qwen3.6-35b-a3b in this PR claim toggle works via the same src/middleware/reasoning.rs; a single “off returned 256/256 tokens, max_tokens 400” is inconsistent with the shared middleware. Action: Re-test reasoning.enabled=false/reasoning_effort=none and reasoning.max_tokens; author toggle (plus budget if forwarded like qwen3-32b) or prove model-specific always-on with docs.
  • [high] [possible mistake] providers/phala/models/qwen/qwen3.8-27b.toml:464 - Check: Limits must be host-served deltas; never derive budget min/max from limit.output/context. Why: Lab is context 262_144/output 32_768, native providers/alibaba/models/qwen3.8-27b.toml inherits it, peers are smaller (providers/groq/models/qwen/qwen3.8-27b.toml 131_072/16_384); Phala claims 1_000_000/262_144 (4x/8x lab) while budget = { min = 1, max = 262_144 } exactly equals its own output and differs from native min = 0. Action: Verify catalog context_length/max_output_length against https://inference.phala.com/v1/models, confirm budget bounds come from the gateway reasoning.max_tokens range/test not the output cap, and fix min or document why 0 is rejected.
  • [medium] [possible mistake] providers/phala/models/moonshotai/kimi-k2.6.toml:219 - Check: Provider base_model files are override-only with real deltas. Why: Lab input includes 8 image types + 9 video types; Phala narrows to image-only with no catalog/test note, same pattern as qwen/qwen3-vl-30b-a3b-instruct.toml:340 (drops all video vs lab) and z-ai/glm-5.3-flash.toml:549 (drops video + application/pdf vs lab). Action: Verify each ID’s catalog modalities or live video/PDF probe and cite it in the header, or delete the [modalities] override to inherit the lab.
  • [medium] [possible mistake] providers/phala/models/qwen/qwen3-vl-30b-a3b-instruct.toml:347 - Check: Do not restate identical limits; author only real deltas. Why: File sets context = 128_000 but omits output, inheriting lab 32_768 which happens to equal the header’s catalog max_output_length 32768 — correct if verified, but header cites only context_length; if catalog output differs the inherit understates/overstates the cap. Action: Confirm catalog max_output_length and either keep inheritance with an explicit header value or author explicit output.
  • [low] [possible mistake] providers/phala/models/qwen/qwen3.5-27b.toml:364 - Check: budget only for a real reasoning-budget field on this path. Why: Same gateway claims reasoning.max_tokens exists (qwen3-32b, qwen3.8-27b author budget), native providers/alibaba/models/qwen3.5-27b.toml and qwen3.5-397b-a17b/qwen3.6-35b-a3b peers are toggle+budget, yet Phala omits budget on qwen3.5-27b, qwen3.5-397b-a17b, and qwen3.6-35b-a3b from one 64 → ~256 tokens sample. Action: Re-test budget scaling with multiple values or author budget = {} if the field is accepted, consistent with qwen3-32b; same for the two sibling files.

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [possible mistake] providers/phala/models/qwen/qwen3.6-27b.toml:8 - Check: Reasoning budget must be authored when the host exposes a real reasoning-token budget field. Why: The file claims always-on (reasoning = { supported = true }) but its own header reports reasoning.max_tokens returned 400 on 3/3 vs 256 tokens for the no-budget control, which indicates the budget field had an effect and contradicts no-caller-control. Action: Re-verify whether reasoning.max_tokens controls reasoning tokens on this host; if it does, add budget = {} (with verified min/max only) matching the alibaba/qwen3.6-27b native baseline, or clarify the comment if 400 was not reasoning tokens.
  • [medium] [possible mistake] providers/phala/models/z-ai/glm-5.3-flash.toml:10 - Check: [modalities] must match the cited catalog capabilities. Why: The header cites catalog input_modalities text,image,video but the file publishes only ["text", "image/jpeg", "image/png"], omitting video entirely because generic video has no exact MIME, which understates the catalog and diverges from the lab's video/mp4, video/x-matroska, video/quicktime. Action: Include the supported video modalities (lab MIME types or generic video if exact mapping is unknown) or provide host evidence that video is not actually served.

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [medium] [possible mistake] providers/phala/models/qwen/qwen3.8-27b.toml:10 - Check: Reasoning budget min/max must be verified on this host; use budget = {} when bounds are not verified and never derive bounds from limit.output/context. Why: budget = { min = 1, max = 262_144 } sets max to exactly the file's limit.output = 262_144, but the header sources max from native thinking_budget 0-262144 (providers/alibaba/models/qwen3.8-27b.toml), not a Phala live test, while min = 1 is sourced from gateway code; the host max is unverified and matches the output cap. Action: Verify reasoning.max_tokens upper bound live on Phala for this model or relax to budget = {} (keeping toggle/effort/default as verified).

@github-actions

Copy link
Copy Markdown
Contributor

No actionable findings.

@github-actions github-actions Bot added the reviewer: ready Automated review found no actionable items label Oct 25, 2026
@github-actions github-actions Bot removed the reviewer: ready Automated review found no actionable items label Oct 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/phala/models/z-ai/glm-5.3-flash.toml:29 - Check: Reasoning baseline must be lab + same-surface peers, do not invent toggle. Why: Lab models/zhipuai/glm-5.3-flash.toml and first-party providers/zhipuai/models/glm-5.3-flash.toml:10 / providers/zai/models/glm-5.3-flash.toml:8 state thinking.type only accepts enabled; peers providers/novita-ai/models/zai-org/glm-5.3-flash.toml:2 (thinking.type=disabled does not suppress) and providers/openrouter/models/z-ai/glm-5.3-flash.toml:16 are effort-only ["low","high","max"] with no toggle. PR adds toggle = true contradicting all three. Action: Remove toggle, keep effort = ["low","high","max"] unless you provide gateway docs plus full request/response proving reasoning.enabled=false yields zero reasoning_content where Novita proves it does not.
  • [high] [violation] providers/phala/models/z-ai/glm-5.3.toml:22 - Check: Do not invent toggle beyond lab/peers. Why: Lab models/zhipuai/glm-5.3.toml and providers/zhipuai/models/glm-5.3.toml:9 are effort-only low|high|max (thinking.type only accepts enabled); peers are providers/novita-ai/models/zai-org/glm-5.3.toml:10 (["none","low","high","max"], no toggle) and providers/openrouter/models/z-ai/glm-5.3.toml:11 (["low","high","max"], no toggle). No lab/peer has toggle. Action: Drop toggle; re-test reasoning.enabled=false vs reasoning_effort=none and author either ["none","low","high","max"] (if none suppresses) or ["low","high","max"] (if always-on with effort only).
  • [high] [possible mistake] providers/phala/models/z-ai/glm-5.2.toml:11 - Check: Missing off-control where lab/peers expose it. Why: Native providers/zhipuai/models/glm-5.2.toml:11 is toggle + ["high","max"]; peer providers/novita-ai/models/zai-org/glm-5.2.toml:9 is ["none","high","max"] where none suppresses. PR claims both reasoning.enabled=false and reasoning_effort=none returned ~256 tokens and authors no off (["high","max"] only), directly contradicting Novita on the same model. Action: Re-verify with reasoning_content traces whether either off mechanism suppresses reasoning on Phala; add toggle and/or none to match the verified behavior.
  • [high] [possible mistake] providers/phala/models/z-ai/glm-5.1.toml:12 - Check: Missing toggle on relay where lab and peers have it. Why: Native providers/zhipuai/models/glm-5.1.toml:21, providers/novita-ai/models/zai-org/glm-5.1.toml:9, and providers/openrouter/models/z-ai/glm-5.1.toml:11 are all toggle = true. PR authors always-on reasoning = { supported = true } based only on own 3/3 off-ignored probes. Action: Re-test thinking.type=disabled forwarding on Phala and provide evidence; if off cannot be made to work, explain why Phala differs from two relays that honor it, else add toggle = true with wire comment.
  • [high] [possible mistake] providers/phala/models/qwen/qwen3.6-27b.toml:11 - Check: Missing controls where lab + peers expose toggle/budget. Why: Native providers/alibaba/models/qwen3.6-27b.toml:21 is toggle + budget, peers providers/novita-ai/models/qwen/qwen3.6-27b.toml:9 (toggle + budget) and providers/openrouter/models/qwen/qwen3.6-27b.toml:11 (toggle) both honor off. PR claims reasoning.enabled=false/none ignored and reasoning.max_tokens rejected and authors no controls, making Phala the sole outlier among 12 sibling Qwen routes on the same gateway that do honor toggle. Action: Re-test toggle/budget forwarding for this ID; add toggle = true (and budget = {} if thinking_budget is accepted) or prove a model-specific gateway exception with traces.
  • [medium] [possible mistake] providers/phala/models/qwen/qwen3.8-27b.toml:44 - Check: limit.output must be catalog max_output_length, not thinking_budget max. Why: Lab models/alibaba/qwen3.8-27b.toml:30 is 32_768; peers are 131_072 (Novita) and 235_929 (OpenRouter). PR sets 262_144, which exactly equals native thinking_budget 0-262144 max (providers/alibaba/models/qwen3.8-27b.toml:3). Comment cites catalog max_output_length 262144 but number matches budget cap, suggesting field confusion. Action: Confirm which catalog field yields 262144 and cite it; if it is thinking_budget max, inherit lab output or use peer-verified cap instead.

@github-actions

Copy link
Copy Markdown
Contributor

Action items

  • [high] [violation] providers/phala/models/moonshotai/kimi-k2.6.toml:11 - Check: Override-only provider files after base_model. Why: output = ["text"] is identical to models/moonshotai/kimi-k2.6.toml output; only input is a real delta (drops video). Restating identical arrays violates AGENTS.md. Action: Remove the output line and keep only the narrowed input.
  • [high] [violation] providers/phala/models/qwen/qwen3-vl-30b-a3b-instruct.toml:10 - Check: Override-only provider files after base_model. Why: output = ["text"] is identical to models/alibaba/qwen3-vl-30b-a3b-instruct.toml output; only input is a real delta (drops video). Action: Remove the output line and keep only the narrowed input.
  • [high] [violation] providers/phala/models/z-ai/glm-5.3-flash.toml:10 - Check: Override-only provider files after base_model. Why: output = ["text"] is identical to models/zhipuai/glm-5.3-flash.toml output; only input is a real delta (drops application/pdf). Action: Remove the output line and keep only the narrowed input.

@kingsleydon
kingsleydon marked this pull request as draft October 25, 2026 10:12
@kingsleydon
kingsleydon marked this pull request as ready for review October 25, 2026 10:12
@github-actions

Copy link
Copy Markdown
Contributor

No actionable findings.

@github-actions github-actions Bot added the reviewer: ready Automated review found no actionable items label Oct 25, 2026
@kingsleydon

kingsleydon commented Oct 25, 2026 •

Copy link
Copy Markdown
Author

This adds Phala (21 models, including Kev 4B via System One) and is now marked reviewer: ready. Notes on the schema-required output arrays and the live-tested reasoning-control deviations are in the description. Ready for review. Thank you!

Add 21 schema-v2 provider entries plus a complete shared Kev 4B lab file.
Use Phala's public prices and limits, official icon, OpenAI-compatible SDK,
PHALA_AI_API_KEY, and the existing System One SDK for v2-only Kev.

Copy native reasoning controls and record host evidence for deviations.
Use reasoning_content compatibility on 16 reasoning models; GPT-OSS returns
reasoning, which v1 cannot represent, so leave its field unset. Ten small
live requests succeeded, including four reasoning_content tool replays.

Validation: bun validate; git diff --check. An equivalent in-place comparison
of all 22 v1 views against dev 7cd0423 found only 20 Phala chat additions,
with existing v1 entries unchanged and this task's Kev entries excluded.
@github-actions github-actions Bot removed the reviewer: ready Automated review found no actionable items label Oct 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

No actionable findings.

@github-actions github-actions Bot added the reviewer: ready Automated review found no actionable items label Oct 25, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewer: ready Automated review found no actionable items

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant