[PR #3363] [CLOSED] [GUI] Forward Composer Effort To Supported API Models #4591

Closed
opened 2026-11-07 15:37:41 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/3363
Author: @medking82
Created: 10/20/2026
Status: ❌ Closed

Base: main ← Head: codex/upstream-api-reasoning-effort


📝 Commits (3)

  • e02f218 [GUI] Forward Composer Effort To Reasoning API Models
  • ab57c5d Use Existing OpenRouter Effort Mapping In Direct Chat
  • fe764fa [Docs] Record App0.2.2 API effort validation

📊 Changes

6 files changed (+725 additions, -7 deletions)

View changed files

📝 apps/host/server/index.mjs (+5 -4)
📝 apps/host/server/model-providers.mjs (+9 -2)
➕ apps/host/tests/api-reasoning-effort.test.mjs (+96 -0)
📝 apps/host/tests/mock-model-api.mjs (+2 -1)
➕ docs/api-reasoning-effort/README.md (+72 -0)
➕ docs/api-reasoning-effort/validation-2026-10-22.json (+541 -0)

📄 Description

Problem and result

Manual chat with a saved reasoning API model displays the composer's selected effort, but runRemoteTurn drops it before constructing the outgoing request. The official Off/Low/Medium/High/Max choice now reaches supported OpenAI-chat models. Models with false or unknown reasoning support retain the provider default.

None required for this focused host bug fix. Existing reasoning checks cover native/agent paths; this change covers direct saved-API chat.

Approach

Carry thinking through the direct-chat path and use saved capability metadata or the host's cached server probe. Ignore capability claims supplied in a client selection. OpenAI-compatible requests map Off to none and Max to high; OpenRouter reuses the existing official OPENROUTER_EFFORTS mapping and reasoning: { effort } format, including Max to xhigh. No new UI levels are introduced. Authentication, history and cancellation remain in the existing request path.

Validation

Windows x64, Node v24.12.0, measured 2026-10-22. Current head fe764fa1ab87ad76f5afec5839d4dd8e347ce0d8 adds documentation only; runtime and test inputs remain identical to the exact head below. Source-bound report and JSON receipt include full commands, dependency/input hashes, setup resolutions and limits.

Passed:

  • 21 passed, 0 failed, 0 skipped at exact runtime/test head ab57c5da90b76983fd44b79130acc17d5a735508: node --test tests/api-reasoning-effort.test.mjs (7) and node --test tests/model-providers.test.mjs tests/openrouter-reasoning.test.mjs tests/thinking-direct.test.mjs (14), from apps/host.
  • The previously skipped real Harness OpenRouter fixture passed against a scripted loopback model. A disposable real Host/mock API covers 20 effort/model combinations inside one test (not 20 additional tests), including five effort levels, saved/probed capabilities, ignored client overrides, OpenRouter's official mapping and unchanged Responses/Anthropic defaults. No separate typecheck/build on this individual PR head is claimed.
  • A separate App 0.2.2 combined scratch candidate, base 011c9e600a93bbc9fd451c563501b5831c32bbca plus #3361 and #3363 implementation patches, passed 68 unique checks, typecheck and Vite build. That is one shared result across both reports, not an extra result per PR or the source submitted individually. Compared installed Host source matches that unpatched base after CRLF normalization.
  • Source/evidence hashes, local links, sanitization and git diff --check passed. No product or test-source workaround was needed.

Failed:

  • Unpatched App 0.2.2 with the new regression fixtures produced 17 passes and 8 expected failures: four selected-model UI cases and four direct-API effort cases. Both implementation patches resolved all eight.
  • Initial scratch dependency layout and missing source-file setup failures were resolved and retained in the receipt. The blocked wider check was rerun once after restoring exact-base inputs; it passed. No unresolved check failure remains. Existing Vite advisory warnings remain nonfatal.

Not run:

Native App window, packaged installer, model download/preparation, live GPU/model or cloud-provider inference, and cross-platform execution. Component tests render actual React components; Host/Harness are real disposable processes with scripted model replies. The staged Harness is pinned at 571902028a75c64c1d767f4ae5fd099485f0ddf0 / 0.2.1-alpha.3 and includes the separate #3684 v2 packaging patch, explicitly recorded in the receipt; this PR does not submit that patch. Installed application files and production configuration were unchanged.

Limits

This applies to OpenAI-chat connections whose saved or probed metadata declares reasoning support. Responses and Anthropic keep their current defaults. Thinking budgets are not added to external API requests.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/3363 **Author:** [@medking82](https://github.com/medking82) **Created:** 10/20/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `codex/upstream-api-reasoning-effort` --- ### 📝 Commits (3) - [`e02f218`](https://github.com/Niko1221/Strata/commit/e02f2189df3610cc98ae6af0eb61828b89acd417) [GUI] Forward Composer Effort To Reasoning API Models - [`ab57c5d`](https://github.com/Niko1221/Strata/commit/ab57c5da90b76983fd44b79130acc17d5a735508) Use Existing OpenRouter Effort Mapping In Direct Chat - [`fe764fa`](https://github.com/Niko1221/Strata/commit/fe764fa1ab87ad76f5afec5839d4dd8e347ce0d8) [Docs] Record App0.2.2 API effort validation ### 📊 Changes **6 files changed** (+725 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `apps/host/server/index.mjs` (+5 -4) 📝 `apps/host/server/model-providers.mjs` (+9 -2) ➕ `apps/host/tests/api-reasoning-effort.test.mjs` (+96 -0) 📝 `apps/host/tests/mock-model-api.mjs` (+2 -1) ➕ `docs/api-reasoning-effort/README.md` (+72 -0) ➕ `docs/api-reasoning-effort/validation-2026-10-22.json` (+541 -0) </details> ### 📄 Description ## Problem and result Manual chat with a saved reasoning API model displays the composer's selected effort, but `runRemoteTurn` drops it before constructing the outgoing request. The official Off/Low/Medium/High/Max choice now reaches supported OpenAI-chat models. Models with false or unknown reasoning support retain the provider default. ## Related discussion None required for this focused host bug fix. Existing reasoning checks cover native/agent paths; this change covers direct saved-API chat. ## Approach Carry `thinking` through the direct-chat path and use saved capability metadata or the host's cached server probe. Ignore capability claims supplied in a client selection. OpenAI-compatible requests map Off to `none` and Max to `high`; OpenRouter reuses the existing official `OPENROUTER_EFFORTS` mapping and `reasoning: { effort }` format, including Max to `xhigh`. No new UI levels are introduced. Authentication, history and cancellation remain in the existing request path. ## Validation Windows x64, Node v24.12.0, measured 2026-10-22. Current head `fe764fa1ab87ad76f5afec5839d4dd8e347ce0d8` adds documentation only; runtime and test inputs remain identical to the exact head below. [Source-bound report](https://github.com/medking82/Strata/blob/fe764fa1ab87ad76f5afec5839d4dd8e347ce0d8/docs/api-reasoning-effort/README.md) and [JSON receipt](https://github.com/medking82/Strata/blob/fe764fa1ab87ad76f5afec5839d4dd8e347ce0d8/docs/api-reasoning-effort/validation-2026-10-22.json) include full commands, dependency/input hashes, setup resolutions and limits. **Passed:** - **21 passed, 0 failed, 0 skipped** at exact runtime/test head `ab57c5da90b76983fd44b79130acc17d5a735508`: `node --test tests/api-reasoning-effort.test.mjs` (7) and `node --test tests/model-providers.test.mjs tests/openrouter-reasoning.test.mjs tests/thinking-direct.test.mjs` (14), from `apps/host`. - The previously skipped **real Harness OpenRouter fixture passed** against a scripted loopback model. A disposable real Host/mock API covers 20 effort/model combinations inside one test (not 20 additional tests), including five effort levels, saved/probed capabilities, ignored client overrides, OpenRouter's official mapping and unchanged Responses/Anthropic defaults. No separate typecheck/build on this individual PR head is claimed. - A **separate App 0.2.2 combined scratch candidate**, base `011c9e600a93bbc9fd451c563501b5831c32bbca` plus #3361 and #3363 implementation patches, passed **68 unique checks**, typecheck and Vite build. That is one shared result across both reports, not an extra result per PR or the source submitted individually. Compared installed Host source matches that unpatched base after CRLF normalization. - Source/evidence hashes, local links, sanitization and `git diff --check` passed. No product or test-source workaround was needed. **Failed:** - Unpatched App 0.2.2 with the new regression fixtures produced 17 passes and **8 expected failures**: four selected-model UI cases and four direct-API effort cases. Both implementation patches resolved all eight. - Initial scratch dependency layout and missing source-file setup failures were resolved and retained in the receipt. The blocked wider check was rerun once after restoring exact-base inputs; it passed. No unresolved check failure remains. Existing Vite advisory warnings remain nonfatal. **Not run:** Native App window, packaged installer, model download/preparation, live GPU/model or cloud-provider inference, and cross-platform execution. Component tests render actual React components; Host/Harness are real disposable processes with scripted model replies. The staged Harness is pinned at `571902028a75c64c1d767f4ae5fd099485f0ddf0` / 0.2.1-alpha.3 and includes the separate #3684 v2 packaging patch, explicitly recorded in the receipt; this PR does not submit that patch. Installed application files and production configuration were unchanged. ## Limits This applies to OpenAI-chat connections whose saved or probed metadata declares reasoning support. Responses and Anthropic keep their current defaults. Thinking budgets are not added to external API requests. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:37:41 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#4591
No description provided.