Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
OPENAI_API_KEY=sk-...
ORGMEMORY_AI_MODEL_CHAT=openai
ORGMEMORY_AI_MODEL_EMBEDDING=openai
ORGMEMORY_ASSISTANT_OPENAI_REASONING_EFFORT=
ORGMEMORY_ASSISTANT_RETRIEVAL_ENGINE=GRAPH_RAG
ORGMEMORY_OPENAI_BASE_URL=https://api.openai.com/v1
ORGMEMORY_OPENAI_MODEL=gpt-5.6-sol
Expand Down
11 changes: 11 additions & 0 deletions .tegami/2026-08-06-assistant-chat-reasoning-effort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
packages:
orgmemory: patch
subject: Keep Assistant tool calls compatible with OpenAI
---

## Fixes

Fresh production deployments now set Answer reasoning to `none` so the
Assistant's governed Skill tools work with `gpt-5.6-sol` on OpenAI Chat
Completions without requiring an organization route workaround.
4 changes: 2 additions & 2 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,8 +403,8 @@ extraction defaults to `gpt-5.4-mini`; the
`ORGMEMORY_GRAPH_EXTRACTION_MODEL` deployment override is independent from the
Assistant model. New Graph jobs pin reasoning effort in schema-v2 processing
profiles while persisted schema-v1 bytes and hashes remain executable.
The verified ZM production route uses `gpt-5.6-sol` for Answer,
`gpt-5.6-luna` with reasoning `none` for Keyword Planning, and
The verified ZM production route uses `gpt-5.6-sol` with reasoning `none` for
Answer, `gpt-5.6-luna` with reasoning `none` for Keyword Planning, and
`gpt-5.4-mini` with provider-default reasoning for Graph Extraction.
Immutable Knowledge Asset embedding
profiles still pin the provider/model used by derived indexes. The default
Expand Down
1 change: 1 addition & 0 deletions apps/api/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ orgmemory:
assistant-chat:
gateway-id: ${ORGMEMORY_ASSISTANT_GATEWAY:openai}
model-id: ${ORGMEMORY_OPENAI_MODEL:gpt-5.6-sol}
open-ai-reasoning-effort: ${ORGMEMORY_ASSISTANT_OPENAI_REASONING_EFFORT:}
keyword-planning:
gateway-id: ${ORGMEMORY_KEYWORD_GATEWAY:${ORGMEMORY_ASSISTANT_GATEWAY:openai}}
model-id: ${ORGMEMORY_KEYWORD_MODEL:${ORGMEMORY_OPENAI_MODEL:gpt-5.6-sol}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,33 @@ void prodCredentialOverrideRetainsTheCompleteOpenAiGatewayDefinition() {
});
}

@Test
void prodAssistantRouteUsesExplicitNoneReasoningEffort() {
new ApplicationContextRunner()
.withInitializer(new ConfigDataApplicationContextInitializer())
.withUserConfiguration(AiModelGatewayConfiguration.class)
.withSystemProperties(
"OPENAI_API_KEY=redacted-base-key",
"ORGMEMORY_OPENAI_API_KEY=redacted-prod-key",
"ORGMEMORY_OPENAI_REASONING_EFFORT_SUPPORTED=true",
"ORGMEMORY_ASSISTANT_OPENAI_REASONING_EFFORT=none")
.withPropertyValues("spring.profiles.active=prod")
.run(context -> {
assertNull(context.getStartupFailure());
assertEquals(
"none",
context.getEnvironment().getProperty(
"orgmemory.ai.routes.assistant-chat.open-ai-reasoning-effort"));

AiGatewayProperties properties =
context.getBean(AiGatewayProperties.class);
assertEquals(
OpenAiReasoningEffort.NONE,
properties.route(AiWorkload.ASSISTANT_CHAT)
.openAiReasoningEffort());
});
}

@Test
void prodKeywordRouteRetainsItsIndependentDeploymentModel() {
new ApplicationContextRunner()
Expand Down
1 change: 1 addition & 0 deletions apps/worker/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ orgmemory:
assistant-chat:
gateway-id: ${ORGMEMORY_ASSISTANT_GATEWAY:openai}
model-id: ${ORGMEMORY_OPENAI_MODEL:gpt-5.6-sol}
open-ai-reasoning-effort: ${ORGMEMORY_ASSISTANT_OPENAI_REASONING_EFFORT:}
keyword-planning:
gateway-id: ${ORGMEMORY_KEYWORD_GATEWAY:${ORGMEMORY_ASSISTANT_GATEWAY:openai}}
model-id: ${ORGMEMORY_KEYWORD_MODEL:${ORGMEMORY_OPENAI_MODEL:gpt-5.6-sol}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,33 @@ void prodCredentialOverrideRetainsTheCompleteOpenAiGatewayDefinition() {
});
}

@Test
void prodAssistantRouteUsesExplicitNoneReasoningEffort() {
new ApplicationContextRunner()
.withInitializer(new ConfigDataApplicationContextInitializer())
.withUserConfiguration(AiModelGatewayConfiguration.class)
.withSystemProperties(
"OPENAI_API_KEY=redacted-base-key",
"ORGMEMORY_OPENAI_API_KEY=redacted-prod-key",
"ORGMEMORY_OPENAI_REASONING_EFFORT_SUPPORTED=true",
"ORGMEMORY_ASSISTANT_OPENAI_REASONING_EFFORT=none")
.withPropertyValues("spring.profiles.active=prod")
.run(context -> {
assertNull(context.getStartupFailure());
assertEquals(
"none",
context.getEnvironment().getProperty(
"orgmemory.ai.routes.assistant-chat.open-ai-reasoning-effort"));

AiGatewayProperties properties =
context.getBean(AiGatewayProperties.class);
assertEquals(
OpenAiReasoningEffort.NONE,
properties.route(AiWorkload.ASSISTANT_CHAT)
.openAiReasoningEffort());
});
}

@Test
void prodKeywordRouteRetainsItsIndependentDeploymentModel() {
new ApplicationContextRunner()
Expand Down
12 changes: 7 additions & 5 deletions docs/specs/domains/ai-model-control-plane.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Source: `core/src/main/java/com/orgmemory/core/ai`,
API/worker `application*.yml`, and
`apps/web/src/features/admin/components/admin-language-models-page.tsx`.

Reconciled: `2026-08-04-assistant-composer-model-picker (2e5907b1)`.
Reconciled: `2026-08-06-assistant-chat-reasoning-effort (c3da6b25)`.

## Current Behavior

Expand Down Expand Up @@ -88,10 +88,12 @@ enqueued jobs; it neither starts reindexing nor changes queued/completed jobs.

The fixed live evaluation approved `gpt-5.6-luna` with reasoning `none` for
Keyword Planning but rejected it for Graph Extraction. Graph therefore retains
`gpt-5.4-mini`; Answer retains `gpt-5.6-sol`. ZM production and the production
Compose defaults now use that evaluated split. The general development
configuration remains capability-off by default because an arbitrary custom
OpenAI-compatible endpoint has not proved `reasoning_effort` support.
`gpt-5.4-mini`; Answer retains `gpt-5.6-sol` with explicit reasoning `none` so
its fixed function tools remain valid on OpenAI Chat Completions. ZM production
and the production Compose defaults use that route split. The general
development configuration remains capability-off and leaves route effort empty
by default because an arbitrary custom OpenAI-compatible endpoint has not
proved `reasoning_effort` support.

Index Settings is a separate read-only surface. The embedding provider, model,
dimensions, and cosine metric cannot be mutated through the chat control plane;
Expand Down
4 changes: 2 additions & 2 deletions docs/tests/domains/ai-model-control-plane.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Source: `core/src/test/java/com/orgmemory/core/ai`,
`apps/web/src/features/admin/components/provider-logo.test.tsx`,
`apps/web/test/e2e/admin-language-models.spec.ts`, and the admin web build.

Reconciled: `2026-08-04-assistant-composer-model-picker (2e5907b1)`.
Reconciled: `2026-08-06-assistant-chat-reasoning-effort (c3da6b25)`.

| Behavior | Evidence | Status |
| --- | --- | --- |
Expand Down Expand Up @@ -36,5 +36,5 @@ Reconciled: `2026-08-04-assistant-composer-model-picker (2e5907b1)`.
| Read-only Index Settings compiles as a production route | web lint, typecheck, and build | covered |
| Keyword is editable, Graph is visible/read-only with future-jobs-only copy, and the backend rejects Graph mutation | `admin-language-models.spec.ts`, `AiGatewayAdministrationServiceTests` | covered |
| Fixed bilingual live evaluation records validity, recall/yield, failures, and p95 without raw prompts/evidence; Keyword Luna passes and Graph Luna fails independently | `evaluation/tests/test_workload_routing_runner.py`, increment `evaluation-result.json` | covered |
| Production defaults and the shared-ZM export preserve the approved Answer/Keyword/Graph split and explicit Keyword reasoning through the bound API/worker runtime properties | API/worker `ProductionAiGatewayConfigurationBindingTests`, production Compose validation, `test-export-team-dev-config.sh`, ZM runtime environment inspection | covered and operator verified |
| Production defaults preserve the approved Answer/Keyword/Graph split, explicit Answer and Keyword reasoning `none`, and provider-default Graph reasoning through the bound API/worker runtime properties | API/worker `ProductionAiGatewayConfigurationBindingTests`, production Compose validation, ZM runtime environment inspection | covered and operator verified |
| Live provider credentials/model responses | no deterministic CI credential | operator verification required |
1 change: 1 addition & 0 deletions infrastructure/deployment/compose.production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ x-spring-environment: &spring-environment
ORGMEMORY_OPENAI_MODEL: ${ORGMEMORY_OPENAI_MODEL:-gpt-5.6-sol}
ORGMEMORY_KEYWORD_MODEL: ${ORGMEMORY_KEYWORD_MODEL:-gpt-5.6-luna}
ORGMEMORY_OPENAI_REASONING_EFFORT_SUPPORTED: ${ORGMEMORY_OPENAI_REASONING_EFFORT_SUPPORTED:-true}
ORGMEMORY_ASSISTANT_OPENAI_REASONING_EFFORT: ${ORGMEMORY_ASSISTANT_OPENAI_REASONING_EFFORT:-none}
ORGMEMORY_KEYWORD_OPENAI_REASONING_EFFORT: ${ORGMEMORY_KEYWORD_OPENAI_REASONING_EFFORT:-none}
ORGMEMORY_GRAPH_QUERY_KEYWORD_CACHE_TTL: ${ORGMEMORY_GRAPH_QUERY_KEYWORD_CACHE_TTL:-24h}
ORGMEMORY_GRAPH_QUERY_MAXIMUM_CONCURRENT_SPACES: ${ORGMEMORY_GRAPH_QUERY_MAXIMUM_CONCURRENT_SPACES:-4}
Expand Down
1 change: 1 addition & 0 deletions infrastructure/deployment/production.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ ORGMEMORY_KEYWORD_MODEL=gpt-5.6-luna
# The official OpenAI gateway was production-verified with reasoning_effort.
# Custom compatible gateways must independently prove the same capability.
ORGMEMORY_OPENAI_REASONING_EFFORT_SUPPORTED=true
ORGMEMORY_ASSISTANT_OPENAI_REASONING_EFFORT=none
ORGMEMORY_KEYWORD_OPENAI_REASONING_EFFORT=none
ORGMEMORY_GRAPH_EXTRACTION_OPENAI_REASONING_EFFORT=
ORGMEMORY_GRAPH_QUERY_KEYWORD_CACHE_TTL=24h
Expand Down