Skip to content

feat: auto-detect image aspect ratio from prompt#125

Open
TriTue2011 wants to merge 228 commits into
basketikun:mainfrom
TriTue2011:main
Open

feat: auto-detect image aspect ratio from prompt#125
TriTue2011 wants to merge 228 commits into
basketikun:mainfrom
TriTue2011:main

Conversation

@TriTue2011
Copy link
Copy Markdown

Cho phép tự động nhận diện tỷ lệ khung hình (ví dụ 16:9, 1:1, 4:3) từ nội dung của prompt để ghi đè lên cấu hình mặc định (khi kích thước bị Home Assistant hoặc các client khác gửi lên mặc định). Điều này cho phép ghi đè tham số \size\ bằng những keyword tìm thấy trong yêu cầu gốc của người dùng.

TriTue2011 added 30 commits May 7, 2026 01:25
…er, buffered streaming, developer role, tool result context, /v1/responses tool support, usage field)
… hide optional-only params to prevent hallucination
…p_system_hints, _iter_stream_segments, separate role chunk
TriTue2011 and others added 30 commits May 13, 2026 09:20
…riority

When search results are detected in user message, move them to
the instructions field which Codex treats as mandatory context.
This forces the model to use search data instead of asking
clarifying questions.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…earch for external

- Keep original user message (don't replace) so tool calling works
- Instructions tell model: tools for home info, search for external questions
- HA prompt already has 'quote specific numbers from search results'

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
HA prompt already has: 'When search results with real data are
provided, always quote specific numbers and facts from them.'
Users can customize prompt in HA Conversation agent settings.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Fixed volume name: chatgpt2api_data with name: for persistence
- Added warnings about docker compose down -v
- Added troubleshooting section for lost API keys
- Added commands to verify and update without data loss

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Bind mount to real host directory — data never lost on rebuild.
- ./chatgpt2api-data:/app/data
- No docker compose down -v risk
- Directory visible and verifiable on host

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
… responses

- max_tokens was being stripped from Codex requests
- Now converts to max_output_tokens (Responses API format)
- Default 4096 if not specified by client

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…back on error

- Custom providers in image combo now try adapter (raise if not found)
- Combo loop properly tries all models including custom providers
- On adapter error, re-raise to trigger next model in combo

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Custom providers that support image gen (like Gemini API server)
now have a generic adapter that sends image generation prompt
to the chat completions endpoint.

Supports: base64 images, image URLs, data URIs in response.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant