# AI translations errors

**URL:** https://meta.discourse.org/t/ai-translations-errors/402477
**Category:** Bug
**Tags:** ai
**Created:** [May 8, 2026, 1:01pm UTC](https://meta.discourse.org/t/ai-translations-errors/402477 "2026-05-08T13:01:09Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [May 8, 2026, 1:01pm UTC](https://meta.discourse.org/t/ai-translations-errors/402477/1 "2026-05-08T13:01:09Z")

</div>

Noticed a bunch of these in the logs:

```plaintext
Message (2 copies reported)

DiscourseAi::Translation: Failed to translate post 120 to da: Validation failed: Raw can't be blank, Cooked can't be blank

/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.5/lib/active_record/validations.rb:87:in 'ActiveRecord::Validations#raise_validation_error'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.5/lib/active_record/validations.rb:54:in 'ActiveRecord::Validations#save!'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.5/lib/active_record/transactions.rb:365:in 'block in ActiveRecord::Transactions#save!'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/activerecord-8.0.5/lib/active_record/transactions.rb:417:in 'block (2 levels) in ActiveRecord::Transactions#with_transaction_returning_status'

Backtrace

/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.5/lib/active_support/broadcast_logger.rb:218:in 'block in ActiveSupport::BroadcastLogger#dispatch'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.5/lib/active_support/broadcast_logger.rb:217:in 'Array#map'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.5/lib/active_support/broadcast_logger.rb:217:in 'ActiveSupport::BroadcastLogger#dispatch'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/activesupport-8.0.5/lib/active_support/broadcast_logger.rb:129:in 'ActiveSupport::BroadcastLogger#warn'
/var/www/discourse/plugins/discourse-ai/lib/translation/verbose_logger.rb:8:in 'DiscourseAi::Translation::VerboseLogger.log'
/var/www/discourse/plugins/discourse-ai/app/jobs/regular/localize_posts.rb:48:in 'block in Jobs::LocalizePosts#execute'
/var/www/discourse/plugins/discourse-ai/app/jobs/regular/localize_posts.rb:29:in 'Array#each'
/var/www/discourse/plugins/discourse-ai/app/jobs/regular/localize_posts.rb:29:in 'Jobs::LocalizePosts#execute'
/var/www/discourse/app/jobs/base.rb:318:in 'block (2 levels) in Jobs::Base#perform'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/rails_multisite-7.0.0/lib/rails_multisite/connection_management/null_instance.rb:49:in 'RailsMultisite::ConnectionManagement::NullInstance#with_connection'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/rails_multisite-7.0.0/lib/rails_multisite/connection_management.rb:17:in 'RailsMultisite::ConnectionManagement.with_connection'
/var/www/discourse/app/jobs/base.rb:305:in 'block in Jobs::Base#perform'
/var/www/discourse/app/jobs/base.rb:301:in 'Array#each'
/var/www/discourse/app/jobs/base.rb:301:in 'Jobs::Base#perform'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/processor.rb:220:in 'Sidekiq::Processor#execute_job'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/processor.rb:185:in 'block (4 levels) in Sidekiq::Processor#process'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/middleware/chain.rb:180:in 'Sidekiq::Middleware::Chain#traverse'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/middleware/chain.rb:183:in 'block in Sidekiq::Middleware::Chain#traverse'
/var/www/discourse/lib/sidekiq/suppress_user_email_errors.rb:6:in 'Sidekiq::SuppressUserEmailErrors#call'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/middleware/chain.rb:182:in 'Sidekiq::Middleware::Chain#traverse'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/middleware/chain.rb:183:in 'block in Sidekiq::Middleware::Chain#traverse'
/var/www/discourse/lib/sidekiq/discourse_event.rb:6:in 'Sidekiq::DiscourseEvent#call'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/middleware/chain.rb:182:in 'Sidekiq::Middleware::Chain#traverse'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/middleware/chain.rb:183:in 'block in Sidekiq::Middleware::Chain#traverse'
/var/www/discourse/lib/sidekiq/pausable.rb:131:in 'Sidekiq::Pausable#call'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/middleware/chain.rb:182:in 'Sidekiq::Middleware::Chain#traverse'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/middleware/chain.rb:183:in 'block in Sidekiq::Middleware::Chain#traverse'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/job/interrupt_handler.rb:9:in 'Sidekiq::Job::InterruptHandler#call'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/middleware/chain.rb:182:in 'Sidekiq::Middleware::Chain#traverse'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/middleware/chain.rb:183:in 'block in Sidekiq::Middleware::Chain#traverse'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/metrics/tracking.rb:26:in 'Sidekiq::Metrics::ExecutionTracker#track'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/metrics/tracking.rb:134:in 'Sidekiq::Metrics::Middleware#call'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/middleware/chain.rb:182:in 'Sidekiq::Middleware::Chain#traverse'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/middleware/chain.rb:173:in 'Sidekiq::Middleware::Chain#invoke'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/processor.rb:184:in 'block (3 levels) in Sidekiq::Processor#process'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/processor.rb:145:in 'block (6 levels) in Sidekiq::Processor#dispatch'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/job_retry.rb:118:in 'Sidekiq::JobRetry#local'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/processor.rb:144:in 'block (5 levels) in Sidekiq::Processor#dispatch'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/config.rb:39:in 'block in <class:Config>'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/processor.rb:139:in 'block (4 levels) in Sidekiq::Processor#dispatch'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/processor.rb:281:in 'Sidekiq::Processor#stats'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/processor.rb:134:in 'block (3 levels) in Sidekiq::Processor#dispatch'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/job_logger.rb:15:in 'Sidekiq::JobLogger#call'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/processor.rb:133:in 'block (2 levels) in Sidekiq::Processor#dispatch'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/job_retry.rb:85:in 'Sidekiq::JobRetry#global'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/processor.rb:132:in 'block in Sidekiq::Processor#dispatch'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/job_logger.rb:40:in 'Sidekiq::JobLogger#prepare'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/processor.rb:131:in 'Sidekiq::Processor#dispatch'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/processor.rb:183:in 'block (2 levels) in Sidekiq::Processor#process'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/processor.rb:182:in 'Thread.handle_interrupt'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/processor.rb:182:in 'block in Sidekiq::Processor#process'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/processor.rb:181:in 'Thread.handle_interrupt'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/processor.rb:181:in 'Sidekiq::Processor#process'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/processor.rb:86:in 'Sidekiq::Processor#process_one'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/processor.rb:76:in 'Sidekiq::Processor#run'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/component.rb:10:in 'Sidekiq::Component#watchdog'
/var/www/discourse/vendor/bundle/ruby/3.4.0/gems/sidekiq-7.3.10/lib/sidekiq/component.rb:19:in 'block in Sidekiq::Component#safe_thread'

```

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [May 8, 2026, 1:08pm UTC](https://meta.discourse.org/t/ai-translations-errors/402477/2 "2026-05-08T13:08:39Z")

</div>

Then you need to check what post 120 contains (simply navigate to `/p/120`) and then check what was the LLM response when it tried to translate that (check the table `ai_api_audit_logs`).

---

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [May 8, 2026, 1:17pm UTC](https://meta.discourse.org/t/ai-translations-errors/402477/3 "2026-05-08T13:17:21Z")

</div>

When I look at the audit logs using this query

```plaintext
SELECT 
  feature_name,
  created_at,
  post_id,
  response_tokens
FROM 
  ai_api_audit_logs
WHERE 
  post_id IS NOT NULL
  AND created_at > :start_date
  AND (response_tokens IS NULL OR response_tokens != 1)
ORDER BY 
  created_at DESC

```

There’s nothing in the results for that post around the date/time stamp shown in the logs.  
Something else I should be looking at?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [May 8, 2026, 1:19pm UTC](https://meta.discourse.org/t/ai-translations-errors/402477/4 "2026-05-08T13:19:31Z")

</div>

Yes, you remove the entire response\_tokens clause from the `WHERE`.

---

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [May 8, 2026, 5:03pm UTC](https://meta.discourse.org/t/ai-translations-errors/402477/5 "2026-05-08T17:03:21Z")

</div>

Okay, first I made a typo earlier, it’s not a PM. I noticed you said use `/p/120` and I used `/t/120`.

`/p/120` points to `https://discussion.mcebuddy2x.com/t/63/1`

Then I run the updated query on the table, I don’t see any entry at the timestamp from the logs → _Th 11:25 pm_

I only see these entries in the table which are closest to the timestamp:

| feature\_name | created\_at | post | response\_tokens |
| --- | --- | --- | --- |
| translation | 2026-05-07T23:26:15.471Z | `https://discussion.mcebuddy2x.com/t/5897/1` | 2423 |
| translation | 2026-05-07T23:11:23.504Z | `https://discussion.mcebuddy2x.com/t/5896/2` | 425 |

None of above the posts id’s match the post id in the error log.

The only time I see a reference to that post id is much later i the logs

| feature\_name | created\_at | post | response\_tokens |
| --- | --- | --- | --- |
| translation | 2026-05-08T03:10:18.214Z | `https://discussion.mcebuddy2x.com/t/63/1` | 0 |

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [May 8, 2026, 5:35pm UTC](https://meta.discourse.org/t/ai-translations-errors/402477/6 "2026-05-08T17:35:44Z")

</div>

Response tokens are useless for debug, you need to show the raw response.

---

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [May 8, 2026, 7:25pm UTC](https://meta.discourse.org/t/ai-translations-errors/402477/7 "2026-05-08T19:25:54Z")

</div>

The thing is I don’t see any response with the same timestamp as the log and the post id.

The next data dump I see for that post id is a hour or so later and it contains this (truncated):

```plaintext
data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":" given","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":".\n\n","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":"Probably","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":" keep","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":" truncated","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":".\n\n","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":"Now","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":" produce","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":" final","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":" JSON","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":" with","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":" \"","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":"output","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":"\":","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":" translation","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":" string","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":".\n\n","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":"Make","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":" sure","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":" to","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":" preserve","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":" line","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":" breaks","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":" exactly","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":" as","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":" original","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":".\n\n","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":"Let's","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":" construct","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":" final","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":" translation","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

data: {"id":"chatcmpl-35a85986-7a6b-4169-893a-b43bcc22b1f2","object":"chat.completion.chunk","created":1778209824,"model":"openai/gpt-oss-120b","system_fingerprint":"fp_d66938db44","choices":[{"index":0,"delta":{"reasoning":".\n\n","channel":"analysis"},"logprobs":null,"finish_reason":null}]}

event: error
data: {"error":{"message":"Failed to generate JSON. Please adjust your prompt. See 'failed_generation' for more details.","type":"invalid_request_error","code":"json_validate_failed","failed_generation":"max completion tokens reached before generating a valid document","status_code":400}}

```

This appears to saying that it’s run out of tokens but that not the warning I see in the logs from the problem here.

Could the data be on a different table?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [May 8, 2026, 7:53pm UTC](https://meta.discourse.org/t/ai-translations-errors/402477/8 "2026-05-08T19:53:51Z")

</div>

The reasoning tokens are eating all the tokens on the `max_tokens` completion limit. Another reason we don’t use reasoning for translations.

We had a site setting to deal with this

> [@Discourse AI Failing to translate large number of posts and topics](https://meta.discourse.org/t/discourse-ai-failing-to-translate-large-number-of-posts-and-topics/385414/12):
>
> We just merged an update that gives you access to a new setting ai\_translation\_max\_tokens\_multiplier which defaults to 1. You should be able to bump this up to any number you like to deal with the limit you’re seeing.

But we removed it back in

[https://github.com/discourse/discourse/pull/38965](https://github.com/discourse/discourse/pull/38965)

---

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [May 9, 2026, 1:45pm UTC](https://meta.discourse.org/t/ai-translations-errors/402477/9 "2026-05-09T13:45:51Z")

</div>

Thanks for the update. I’ve switched to a non reasoning model 3b for translations. Let’s see how it goes.

---

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [May 10, 2026, 6:18am UTC](https://meta.discourse.org/t/ai-translations-errors/402477/10 "2026-05-10T06:18:24Z")

</div>

After switching to the Ollama 3.1 3B model which doesn’t use reasoning I’m now seeing a totally different error:

> DiscourseAi::Completions::Endpoints::OpenAi: status: 400 - body: {“error”:{“message”:“This model does not support response format `json_schema`. See supported models at [Structured Outputs - GroqDocs](https://console.groq.com/docs/structured-outputs#supported-models%22,%22type%22:%22invalid_request_error%22,%22param%22:%22response_format)”}}

I’m a little lost on how to proceed. What model is suited for translations in discourse ?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [May 10, 2026, 11:25am UTC](https://meta.discourse.org/t/ai-translations-errors/402477/11 "2026-05-10T11:25:41Z")

</div>

You need a model with structured outputs support, which is basically every SotA model released recently.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 24, 2026, 7:00am UTC](https://meta.discourse.org/t/ai-translations-errors/402477/12 "2026-08-24T07:00:24Z")

</div>


