codeharbor 0.1.21 → 0.1.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.env.example CHANGED
@@ -68,6 +68,10 @@ CLI_COMPAT_TRANSCRIBE_AUDIO=false
68
68
  CLI_COMPAT_AUDIO_TRANSCRIBE_MODEL=gpt-4o-mini-transcribe
69
69
  CLI_COMPAT_AUDIO_TRANSCRIBE_TIMEOUT_MS=120000
70
70
  CLI_COMPAT_AUDIO_TRANSCRIBE_MAX_CHARS=6000
71
+ CLI_COMPAT_AUDIO_TRANSCRIBE_MAX_RETRIES=1
72
+ CLI_COMPAT_AUDIO_TRANSCRIBE_RETRY_DELAY_MS=800
73
+ # Skip transcription when audio file is larger than this limit (bytes). Default: 25MB.
74
+ CLI_COMPAT_AUDIO_TRANSCRIBE_MAX_BYTES=26214400
71
75
  # Optional local whisper command. Use {input} placeholder for the audio file path.
72
76
  # Example:
73
77
  # CLI_COMPAT_AUDIO_LOCAL_WHISPER_COMMAND=codeharbor-whisper-transcribe --input {input} --model small
package/README.md CHANGED
@@ -468,6 +468,12 @@ To make IM behavior closer to local `codex` CLI interaction, enable:
468
468
  - timeout for each audio transcription request
469
469
  - `CLI_COMPAT_AUDIO_TRANSCRIBE_MAX_CHARS`
470
470
  - max transcript length appended to prompt for one attachment
471
+ - `CLI_COMPAT_AUDIO_TRANSCRIBE_MAX_RETRIES`
472
+ - retry count for local/OpenAI transcription failures (default `1`)
473
+ - `CLI_COMPAT_AUDIO_TRANSCRIBE_RETRY_DELAY_MS`
474
+ - base retry delay between attempts
475
+ - `CLI_COMPAT_AUDIO_TRANSCRIBE_MAX_BYTES`
476
+ - skip transcription when attachment is larger than this size
471
477
  - `CLI_COMPAT_AUDIO_LOCAL_WHISPER_COMMAND`
472
478
  - optional local whisper command template (use `{input}` placeholder for audio file path)
473
479
  - helper command shipped by package: `codeharbor-whisper-transcribe --input {input} --model small`
@@ -519,11 +525,13 @@ When image attachments are present and `CLI_COMPAT_FETCH_MEDIA=true`, CodeHarbor
519
525
  When audio attachments are present and both `CLI_COMPAT_FETCH_MEDIA=true` and `CLI_COMPAT_TRANSCRIBE_AUDIO=true`, CodeHarbor will:
520
526
 
521
527
  1. download `m.audio` media to a temp file
522
- 2. if `CLI_COMPAT_AUDIO_LOCAL_WHISPER_COMMAND` is configured, execute local whisper first
523
- 3. if local whisper fails and `OPENAI_API_KEY` is available, fallback to OpenAI transcription API
524
- 4. append transcript to `[audio_transcripts]` prompt block
525
- 5. continue request even if transcription fails (warn log + no transcript)
526
- 6. best-effort cleanup temp files after the request
528
+ 2. skip oversized audio files based on `CLI_COMPAT_AUDIO_TRANSCRIBE_MAX_BYTES`
529
+ 3. if `CLI_COMPAT_AUDIO_LOCAL_WHISPER_COMMAND` is configured, execute local whisper first
530
+ 4. if local whisper fails and `OPENAI_API_KEY` is available, fallback to OpenAI transcription API
531
+ 5. retry transient failures using `CLI_COMPAT_AUDIO_TRANSCRIBE_MAX_RETRIES`
532
+ 6. append transcript to `[audio_transcripts]` prompt block
533
+ 7. continue request even if transcription fails (warn log + no transcript)
534
+ 8. best-effort cleanup temp files after the request
527
535
 
528
536
  `OPENAI_API_KEY` is optional when local whisper command is configured, and required only for OpenAI fallback.
529
537
  For `codeharbor-whisper-transcribe`, install runtime first: `python3 -m pip install faster-whisper`.