fix: persist environment selection, support Kilo AI provider, resolve Superset virtual columns for translation preview

- Add environment_id to TranslationJob model/schema/API + DB migration
- Pass environmentId from page to TranslationPreview and fetchPreview
- Fix _fetch_sample_rows: use result_type='samples' to include virtual cols
- Add 'kilo' and 'openrouter' to supported LLM provider types
- Make response_format conditional (skip for non-OpenAI upstream providers)
- Remove source_table field from form (redundant with datasource)
- Restore datasourceSearch display from saved job on page load
- Add request/response logging for LLM API calls
This commit is contained in:
2026-05-09 23:10:15 +03:00
parent 85121191d4
commit c2bff20937
15 changed files with 292 additions and 68 deletions

View File

@@ -53,6 +53,9 @@ class TranslationJob(Base):
batch_size = Column(Integer, nullable=False, default=50, comment="Records per batch")
upsert_strategy = Column(String, nullable=False, default="MERGE", comment="MERGE, INSERT, UPDATE")
# Environment association
environment_id = Column(String, nullable=True, comment="Superset environment ID for datasource access")
created_by = Column(String, nullable=True)
created_at = Column(DateTime, default=lambda: datetime.now(timezone.utc))
updated_at = Column(DateTime, default=lambda: datetime.now(timezone.utc), onupdate=lambda: datetime.now(timezone.utc))