Skip to content

fix(deploy): default assistant reasoning effort to none - #308

Merged
kl3inIT merged 4 commits into
mainfrom
fix/assistant-chat-reasoning-effort
Aug 6, 2026
Merged

fix(deploy): default assistant reasoning effort to none#308
kl3inIT merged 4 commits into
mainfrom
fix/assistant-chat-reasoning-effort

Conversation

@kl3inIT

@kl3inIT kl3inIT commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • bind ORGMEMORY_ASSISTANT_OPENAI_REASONING_EFFORT into the Assistant route in both API and worker
  • default the production Compose environment to none while leaving general development configuration empty/capability-off
  • prove production-like API and worker binding, and reconcile the AI route documentation
  • keep Assistant tool wiring and /v1/chat/completions unchanged

Production incident

The first post-deploy 50-case sweep failed every Assistant turn with:

400: Function tools with reasoning_effort are not supported for gpt-5.6-sol in /v1/chat/completions. To use function tools, use /v1/responses or set reasoning_effort to 'none'.

PR #304 added fixed Assistant function tools, but the deployment route had no explicit reasoning effort. The gateway default therefore made tools plus implicit effort invalid.

Temporary mitigation to remove after deployment verification

Production currently has an organization ASSISTANT_CHAT override pointing to the OPENAI-preset openai-chat-noeffort profile 92d0993f-d53a-442c-8576-90868696628a with openAiReasoningEffort=NONE. After this PR is deployed and the default route is verified, an organization administrator must clear the route first and then disable the now-unused profile.

List only; do not run before the deployment is verified:

curl --fail-with-body -X DELETE -H "Authorization: Bearer ${ADMIN_TOKEN}" https://om.kl3in.tech/api/admin/ai/routes/ASSISTANT_CHAT
curl --fail-with-body -X DELETE -H "Authorization: Bearer ${ADMIN_TOKEN}" https://om.kl3in.tech/api/admin/ai/gateways/92d0993f-d53a-442c-8576-90868696628a

Sweep evidence

The owner-approved final sweep is recorded in docs/increments/completed/2026-08-05-assistant-answer-behavior/official-eval-report-2026-08-06.json and results.md:

  • 50/50 terminal completions after the temporary explicit-none override
  • permission 49/50; P035 is the documented official-dataset inconsistency
  • exact citations 41/43 Allow cases
  • end-to-end latency median 3,432 ms
  • all seven Deny-labeled answers were clean of banned pipeline-voice wording

Verification

  • ./gradlew.bat --no-daemon clean test (clean_test_exit=0)
  • API and worker ProductionAiGatewayConfigurationBindingTests: 3 tests each, 0 failures/errors
  • production Compose config --quiet and rendered API/worker Assistant effort: none
  • mechanical Java/config floor: no missing package declarations, zero-byte source/config files, or misnamed Flyway migrations
  • JetBrains inspection unavailable in this session; Gradle and the mechanical fallback were used

Summary by CodeRabbit

  • New Features

    • Added configurable OpenAI reasoning effort for assistant chat routes.
    • Production environments now default to no additional reasoning effort, supporting faster assistant responses.
    • Added example configuration values for local and production deployments.
  • Tests

    • Added validation confirming the reasoning setting is correctly recognized in production configurations.
  • Documentation

    • Updated architecture guidance to reflect the assistant and keyword-planning model configurations.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@kl3inIT, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 50 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 0293b41c-cfa9-421e-ae4d-8ef5dad08b36

📥 Commits

Reviewing files that changed from the base of the PR and between 64a99cf and 48b8cc2.

📒 Files selected for processing (2)
  • .env.example
  • .tegami/2026-08-06-assistant-chat-reasoning-effort.md
📝 Walkthrough

Walkthrough

The assistant route now accepts an OpenAI reasoning-effort setting in API and worker configurations. Production deployment examples default this setting to none. Production binding tests validate the setting, and architecture documentation records the production routing.

Changes

Assistant reasoning configuration

Layer / File(s) Summary
Route configuration and deployment wiring
apps/api/src/main/resources/application.yml, apps/worker/src/main/resources/application.yml, infrastructure/deployment/compose.production.yaml, infrastructure/deployment/production.env.example, .env.example
The API and worker assistant routes accept ORGMEMORY_ASSISTANT_OPENAI_REASONING_EFFORT. Production deployment settings default it to none, while the root example uses an empty default.
Production binding validation
apps/api/src/test/java/com/orgmemory/api/security/ProductionAiGatewayConfigurationBindingTests.java, apps/worker/src/test/java/com/orgmemory/worker/ProductionAiGatewayConfigurationBindingTests.java
Production-profile tests verify that none binds as OpenAiReasoningEffort.NONE for the assistant route.
Production routing documentation
ARCHITECTURE.md
The documented production Answer route explicitly uses reasoning none with gpt-5.6-sol. Keyword Planning remains configured with gpt-5.6-luna and reasoning none.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the deployment fix and the new default of none for Assistant reasoning effort.
Description check ✅ Passed The description covers the change, incident, verification evidence, and documentation impact, although the template's dedicated Documentation impact section is omitted.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/assistant-chat-reasoning-effort

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Tegami

This repository uses Tegami to manage releases. When your changes affect published packages, add a changelog file under .tegami/ before merging.

Create a changelog → · Changelog format

Release preview

Package Bump Version
orgmemory minor 0.2.00.3.0

Changelogs in this PR

Changelog Title
2026-08-06-assistant-chat-reasoning-effort.md Fixes

Run pnpm run tegami locally to create a changelog interactively.

Managed by Tegami.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.env.example:
- Line 13: Move ORGMEMORY_ASSISTANT_OPENAI_REASONING_EFFORT above
ORGMEMORY_ASSISTANT_RETRIEVAL_ENGINE in .env.example, preserving the existing
key names and values.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1a03e535-cdd3-4994-8cf7-2c3d661b0421

📥 Commits

Reviewing files that changed from the base of the PR and between 93148b2 and 64a99cf.

⛔ Files ignored due to path filters (2)
  • docs/specs/domains/ai-model-control-plane.md is excluded by !docs/**
  • docs/tests/domains/ai-model-control-plane.md is excluded by !docs/**
📒 Files selected for processing (8)
  • .env.example
  • ARCHITECTURE.md
  • apps/api/src/main/resources/application.yml
  • apps/api/src/test/java/com/orgmemory/api/security/ProductionAiGatewayConfigurationBindingTests.java
  • apps/worker/src/main/resources/application.yml
  • apps/worker/src/test/java/com/orgmemory/worker/ProductionAiGatewayConfigurationBindingTests.java
  • infrastructure/deployment/compose.production.yaml
  • infrastructure/deployment/production.env.example
📜 Review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: Backend · Java 25
  • GitHub Check: Deployment contracts
  • GitHub Check: Web · Node 24
🧰 Additional context used
📓 Path-based instructions (2)
**/*

📄 CodeRabbit inference engine (AGENTS.md)

**/*: Treat the repository and runtime evidence as the engineering system of record; do not treat chat or Northstar as authoritative.
Before changing a domain, read its specification, test-coverage document, and applicable decision filenames.
Material decisions about domain boundaries, authorization, persistence, publication, concurrency, cache isolation, parity scope, or deployment require an independent architecture challenge and documented alternatives before implementation.
Do not use completed increment documents as the source for current behavior; use them only for history or archaeology.
Before using unfamiliar Spring Boot, Spring Modulith, Spring AI, Gradle, React, Vite, Tailwind, TypeScript, Next.js, or Fumadocs APIs, consult current official documentation, Context7, and the relevant verification skill.
Read docs/guidelines/agent-safety.md before retrieval, AI, MCP, permission, upload, graph, or export work; never commit secrets or customer data.
Keep ddl-auto=validate and pair every persisted-model change with a Flyway migration.
Use the testing harness; a terminating clean test is the JVM context gate, and bootRun is not verification.

Files:

  • apps/worker/src/main/resources/application.yml
  • infrastructure/deployment/production.env.example
  • apps/api/src/test/java/com/orgmemory/api/security/ProductionAiGatewayConfigurationBindingTests.java
  • ARCHITECTURE.md
  • infrastructure/deployment/compose.production.yaml
  • apps/api/src/main/resources/application.yml
  • apps/worker/src/test/java/com/orgmemory/worker/ProductionAiGatewayConfigurationBindingTests.java
**/*.java

📄 CodeRabbit inference engine (AGENTS.md)

Apply IDE inspection only to edited backend Java files.

Files:

  • apps/api/src/test/java/com/orgmemory/api/security/ProductionAiGatewayConfigurationBindingTests.java
  • apps/worker/src/test/java/com/orgmemory/worker/ProductionAiGatewayConfigurationBindingTests.java
🧠 Learnings (1)
📚 Learning: 2026-07-27T14:53:53.633Z
Learnt from: kl3inIT
Repo: kl3inIT/OrgMemory PR: 92
File: infrastructure/deployment/compose.production.yaml:304-310
Timestamp: 2026-07-27T14:53:53.633Z
Learning: For OrgMemory’s Spring Boot SCIM configuration, the `application.yml`/`application-prod.yml` map `orgmemory.security.scim.*` properties via `${ORGMEMORY_SCIM_*}` placeholders. Therefore, in deployment Compose files and related environment/CI templates, set environment variables using the `ORGMEMORY_SCIM_*` names (e.g., `ORGMEMORY_SCIM_VERIFIER_KEY`) rather than “relaxed-binding-derived” names such as `ORGMEMORY_SECURITY_SCIM_*`. This is required to ensure Spring resolves the intended SCIM configuration properties.

Applied to files:

  • infrastructure/deployment/compose.production.yaml
🪛 dotenv-linter (4.0.0)
.env.example

[warning] 13-13: [UnorderedKey] The ORGMEMORY_ASSISTANT_OPENAI_REASONING_EFFORT key should go before the ORGMEMORY_ASSISTANT_RETRIEVAL_ENGINE key

(UnorderedKey)

🔇 Additional comments (7)
apps/api/src/main/resources/application.yml (1)

106-106: LGTM!

apps/worker/src/main/resources/application.yml (1)

81-81: LGTM!

infrastructure/deployment/compose.production.yaml (1)

68-68: LGTM!

infrastructure/deployment/production.env.example (1)

78-78: LGTM!

apps/api/src/test/java/com/orgmemory/api/security/ProductionAiGatewayConfigurationBindingTests.java (1)

50-75: LGTM!

apps/worker/src/test/java/com/orgmemory/worker/ProductionAiGatewayConfigurationBindingTests.java (1)

48-73: LGTM!

ARCHITECTURE.md (1)

406-407: LGTM!

Comment thread .env.example Outdated
@kl3inIT
kl3inIT merged commit 438cf19 into main Aug 6, 2026
18 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.

2 participants