Skip to content

sync dev to stable#576

Merged
Yimin-Jin merged 11 commits into
template/stablefrom
template/dev
Jul 23, 2026
Merged

sync dev to stable#576
Yimin-Jin merged 11 commits into
template/stablefrom
template/dev

Conversation

@Yimin-Jin

Copy link
Copy Markdown
Collaborator

No description provided.

Yimin-Jin and others added 11 commits July 7, 2026 14:22
…er models

Run 28846102061 hit 'LLM API returned 400' for 90/91 templates. Auth and routing succeeded (not 401/404), so the request body was rejected — the classic newer-model (gpt-5.x / reasoning) incompatibility with the legacy chat-completions params.

- Use max_completion_tokens instead of the legacy max_tokens (newer models 400 on max_tokens)

- Omit temperature (several newer models only accept the default and 400 otherwise)

- Bump the default api-version to 2024-10-21 (>= 2024-09-01-preview, required for max_completion_tokens) and make it overridable via AZURE_OPENAI_API_VERSION

- Log a truncated response body on failure so the exact 400 reason is visible in CI instead of a bare status code
fix(sample-catalog): make LLM description request compatible with newer models
…ning models

After #522 fixed the 400s, run 28846883377 still left 26/91 descriptions empty with no error in the log. The deployment is a reasoning model (gpt-5.x / o-series): LLM phase took ~8s/template, and such models spend the completion budget on hidden reasoning tokens BEFORE emitting content. With max_completion_tokens=800, ~1/4 of templates exhausted the budget on reasoning alone and returned EMPTY content (finish_reason=length).

The empty-content branch (and the no-description branch) returned null WITHOUT warning, so the failures were invisible.

- Raise the default budget to 2000 tokens (output is one sentence; headroom is cheap), overridable via AZURE_OPENAI_MAX_COMPLETION_TOKENS

- Add optional AZURE_OPENAI_REASONING_EFFORT (only sent when set, since non-reasoning models 400 on it) to cap hidden reasoning for this trivial task

- Emit a diagnostic warning (with finish_reason and reasoning_tokens) instead of silently returning null, for both the empty-content and missing-description paths
Adds PINNED_TEMPLATE_PATHS and reorderPinnedFirst so the generated sample-catalog.json lists the framework hello-world and most-requested samples first. Gallery order is now controlled entirely by the catalog JSON.
@Yimin-Jin
Yimin-Jin requested a review from huimiu as a code owner July 23, 2026 05:57
@Yimin-Jin
Yimin-Jin merged commit 0f9cab8 into template/stable Jul 23, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant