diff --git a/backend/Cargo.lock b/backend/Cargo.lock index c622309..b88c55e 100644 --- a/backend/Cargo.lock +++ b/backend/Cargo.lock @@ -1517,7 +1517,7 @@ checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" [[package]] name = "mangalord" -version = "0.77.0" +version = "0.77.1" dependencies = [ "anyhow", "argon2", diff --git a/backend/Cargo.toml b/backend/Cargo.toml index 446d0b6..263e119 100644 --- a/backend/Cargo.toml +++ b/backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mangalord" -version = "0.77.0" +version = "0.77.1" edition = "2021" default-run = "mangalord" diff --git a/backend/src/config.rs b/backend/src/config.rs index fe73315..f90b245 100644 --- a/backend/src/config.rs +++ b/backend/src/config.rs @@ -113,6 +113,10 @@ pub struct AnalysisConfig { /// Whole-job timeout in the worker (`ANALYSIS_JOB_TIMEOUT_SECS`). pub job_timeout: Duration, /// Output token cap sent as `max_tokens` (`ANALYSIS_MAX_TOKENS`). + /// Must be generous enough to hold the full JSON for a text-dense page + /// — too low truncates the response mid-object (`finish_reason: + /// length`) and the parse fails. The page image + prompt are only a few + /// hundred tokens, so a large output budget still fits an 8k window. pub max_tokens: u32, /// Longest image edge (px) before downscaling (`ANALYSIS_MAX_IMAGE_DIM`). pub max_image_dim: u32, @@ -134,7 +138,7 @@ impl Default for AnalysisConfig { api_key: None, request_timeout: Duration::from_secs(120), job_timeout: Duration::from_secs(180), - max_tokens: 900, + max_tokens: 4096, max_image_dim: 1024, max_image_bytes: 8 * 1024 * 1024, response_format: ResponseFormat::JsonSchema, diff --git a/frontend/package.json b/frontend/package.json index 6b3b491..8b02f25 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -1,6 +1,6 @@ { "name": "mangalord-frontend", - "version": "0.77.0", + "version": "0.77.1", "private": true, "type": "module", "scripts": {