Skip to content

fix(llm_fal_ai): validate OpenAPI generation inputs#251

Open
moctarjallo wants to merge 1 commit into
apexive:18.0from
moctarjallo:codex/fal-ai-openapi-input-validation
Open

fix(llm_fal_ai): validate OpenAPI generation inputs#251
moctarjallo wants to merge 1 commit into
apexive:18.0from
moctarjallo:codex/fal-ai-openapi-input-validation

Conversation

@moctarjallo
Copy link
Copy Markdown
Contributor

What changed

  • Resolve fal.ai input schemas from named OpenAPI request/response refs, not only components named Input and Output.
  • Map generic generation inputs such as image to schema-specific fields like image_url using the resolved schema.
  • Validate required generation inputs before calling fal.ai so missing prompt/image fields fail with a clear Odoo error.
  • Add tests for named refs, OpenAPI schema fallback input mapping, and required-field validation.

Why

Some fal.ai endpoints expose schemas through named OpenAPI refs and require fields such as prompt plus image_url. Without resolving those refs, assistant calls can send only an attachment or use the wrong field name, producing avoidable provider failures.

Validation

  • python3 AST parse for the touched files
  • ruff check llm_fal_ai/models/fal_ai_provider.py llm_fal_ai/tests/test_fal_ai_provider.py
  • docker compose exec odoo odoo -c /etc/odoo/odoo.conf -d codex_fal_ai_test --init llm_fal_ai --test-enable --test-tags /llm_fal_ai --stop-after-init --http-port=18069 --gevent-port=18072 --db-filter=codex_fal_ai_test

@moctarjallo moctarjallo marked this pull request as ready for review May 11, 2026 04:27
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