supplier+deploy/mainnet: log job_failed reasons; bump openai timeout 180s→300s; chatmock reasoning_effort=low

- jobRunner.ts: console.warn at each jobs.fail site (chat + tts paths, 6 sites). Three mainnet GPT-supplier 502s on 2026-05-19 left no trace beyond Traefik — adding a one-line log restores grep-ability.
- docker-compose.supplier-gpt.yml: OPENAI_TIMEOUT_MS 180000→300000. The 3 observed 502s were all exactly 90 polls × 2s, i.e. the supplier's openai_timeout firing.
- docker-compose.chatmock.yml: serve --reasoning-effort low --reasoning-summary none. Default 'medium'/'auto' pushed GPT-5.4 think-time over the prior 180s budget.

Note: on-chain advert ADVERT_MAX_PROCESSING_MS still pins 180000 until a re-advert tx is posted — buyers compare against the on-chain value, not the runtime env.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
david
2026-05-20 10:42:13 +02:00
parent f39865ae13
commit 87e126b22c
3 changed files with 25 additions and 2 deletions

View File

@@ -45,7 +45,12 @@ services:
chatmock: chatmock:
image: storagetime/chatmock:v1.36 image: storagetime/chatmock:v1.36
container_name: marketplace-mainnet-chatmock container_name: marketplace-mainnet-chatmock
command: ["serve"] # --reasoning-effort low + --reasoning-summary none cap GPT-5 thinking
# tokens so a normal request returns well inside the supplier's
# OPENAI_TIMEOUT_MS budget. Default `medium`/`auto` produced 3-min
# timeouts in early mainnet testing (jobs bcc973bd / c85eaeec /
# 7e87afe6 on 2026-05-19).
command: ["serve", "--reasoning-effort", "low", "--reasoning-summary", "none"]
restart: unless-stopped restart: unless-stopped
environment: environment:
CHATGPT_LOCAL_HOME: /data CHATGPT_LOCAL_HOME: /data

View File

@@ -36,7 +36,7 @@ services:
environment: environment:
LLM_BACKEND: openai LLM_BACKEND: openai
OPENAI_BASE_URL: http://marketplace-mainnet-chatmock:8000 OPENAI_BASE_URL: http://marketplace-mainnet-chatmock:8000
OPENAI_TIMEOUT_MS: "180000" OPENAI_TIMEOUT_MS: "300000"
PORT: "8080" PORT: "8080"
# Enable LiveOgmiosProvider so submitTx/awaitTx actually broadcast. # Enable LiveOgmiosProvider so submitTx/awaitTx actually broadcast.
# Mirrors the testnet supplier compose; without this the supplier # Mirrors the testnet supplier compose; without this the supplier

View File

@@ -112,6 +112,9 @@ export async function runChatJob(params: RunChatJobParams): Promise<void> {
rawReason === "ollama_timeout" ? "ollama_failure" rawReason === "ollama_timeout" ? "ollama_failure"
: rawReason === "openai_timeout" ? "openai_failure" : rawReason === "openai_timeout" ? "openai_failure"
: rawReason; : rawReason;
console.warn(
`[job_failed] jobId=${jobId} reason=${rawReason} httpStatus=502 msg=${message}`,
);
deps.jobs.fail(jobId, { deps.jobs.fail(jobId, {
httpStatus: 502, httpStatus: 502,
reason: collapsedReason, reason: collapsedReason,
@@ -148,6 +151,9 @@ export async function runChatJob(params: RunChatJobParams): Promise<void> {
}); });
} catch (err) { } catch (err) {
const message = err instanceof Error ? err.message : String(err); const message = err instanceof Error ? err.message : String(err);
console.warn(
`[job_failed] jobId=${jobId} reason=submit_failed httpStatus=502 msg=${message}`,
);
deps.jobs.fail(jobId, { deps.jobs.fail(jobId, {
httpStatus: 502, httpStatus: 502,
reason: "submit_failed", reason: "submit_failed",
@@ -161,6 +167,9 @@ export async function runChatJob(params: RunChatJobParams): Promise<void> {
await deps.chain.awaitTx(buildResult.expectedTxHash, 60_000); await deps.chain.awaitTx(buildResult.expectedTxHash, 60_000);
} catch (err) { } catch (err) {
const msg = err instanceof Error ? err.message : String(err); const msg = err instanceof Error ? err.message : String(err);
console.warn(
`[job_failed] jobId=${jobId} reason=submit_timeout httpStatus=502 msg=${msg}`,
);
deps.jobs.fail(jobId, { deps.jobs.fail(jobId, {
httpStatus: 502, httpStatus: 502,
reason: "submit_timeout", reason: "submit_timeout",
@@ -250,6 +259,9 @@ export async function runTtsJob(params: RunTtsJobParams): Promise<void> {
} catch (err) { } catch (err) {
const reason = (err as piper.PiperError)?.reason ?? "piper_failure"; const reason = (err as piper.PiperError)?.reason ?? "piper_failure";
const message = err instanceof Error ? err.message : String(err); const message = err instanceof Error ? err.message : String(err);
console.warn(
`[job_failed] jobId=${jobId} reason=${reason} httpStatus=502 msg=${message}`,
);
deps.jobs.fail(jobId, { deps.jobs.fail(jobId, {
httpStatus: 502, httpStatus: 502,
reason: reason === "piper_timeout" ? "piper_failure" : reason, reason: reason === "piper_timeout" ? "piper_failure" : reason,
@@ -288,6 +300,9 @@ export async function runTtsJob(params: RunTtsJobParams): Promise<void> {
}); });
} catch (err) { } catch (err) {
const message = err instanceof Error ? err.message : String(err); const message = err instanceof Error ? err.message : String(err);
console.warn(
`[job_failed] jobId=${jobId} reason=submit_failed httpStatus=502 msg=${message}`,
);
deps.jobs.fail(jobId, { deps.jobs.fail(jobId, {
httpStatus: 502, httpStatus: 502,
reason: "submit_failed", reason: "submit_failed",
@@ -301,6 +316,9 @@ export async function runTtsJob(params: RunTtsJobParams): Promise<void> {
await deps.chain.awaitTx(buildResult.expectedTxHash, 60_000); await deps.chain.awaitTx(buildResult.expectedTxHash, 60_000);
} catch (err) { } catch (err) {
const msg = err instanceof Error ? err.message : String(err); const msg = err instanceof Error ? err.message : String(err);
console.warn(
`[job_failed] jobId=${jobId} reason=submit_timeout httpStatus=502 msg=${msg}`,
);
deps.jobs.fail(jobId, { deps.jobs.fail(jobId, {
httpStatus: 502, httpStatus: 502,
reason: "submit_timeout", reason: "submit_timeout",