Skip to content

feat(dataset-updater): multi-provider API + gpt-5.5 for EN translations - #302

Merged
jsboige merged 1 commit into
masterfrom
feat/dataset-updater-gpt55-multi-provider
May 18, 2026
Merged

feat(dataset-updater): multi-provider API + gpt-5.5 for EN translations#302
jsboige merged 1 commit into
masterfrom
feat/dataset-updater-gpt55-multi-provider

Conversation

@jsboige

@jsboige jsboige commented May 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add BaseUrl and MaxOutputTokens support to Prompt.cs and DatasetUpdaterConfig.cs, enabling any OpenAI-compatible API endpoint (OpenRouter, local models, etc.)
  • Switch Virtues EN and Scenarii EN translation configs from gpt-5.4-mini to gpt-5.5 via direct OpenAI API for best translation quality
  • Add .keys/ to .gitignore for API key file storage

Benchmark Results (6 models tested)

Model Time Quality Cost/1M tokens
gpt-5.4-mini 2.5s Standard $0.30/$1.60
gpt-5.5 6s Excellent $5/$30
claude-sonnet-4.6 4s Very good $3/$15
claude-opus-4.7 12s Excellent $15/$75

Changes

  • Prompt.cs: Added BaseUrl (custom endpoint) and MaxOutputTokens properties; client construction branches on BaseUrl presence using ApiKeyCredential
  • DatasetUpdaterConfig.cs: Added BaseUrl and MaxOutputTokens properties, threaded into Prompt construction
  • DatasetUpdaterRootConfig.cs: Virtues EN + Scenarii EN configs updated to Model = "gpt-5.5", OpenAIKeyPath = ".keys\openai-key.txt", MaxOutputTokens = 4096, ChunkSize = 4
  • .gitignore: Added .keys/ directory

Test plan

  • dotnet build passes with 0 errors
  • 120 tests pass, 0 fail, 5 skip (GSheet OAuth + Freeplane — expected)
  • Manual: enable Scenarii EN config and run pilot (3-5 records) to verify gpt-5.5 endpoint
  • Manual: verify Virtues EN translation with gpt-5.5

🤖 Generated with Claude Code

…figs to gpt-5.5

Add BaseUrl and MaxOutputTokens to Prompt.cs and DatasetUpdaterConfig.cs,
enabling any OpenAI-compatible API endpoint (OpenRouter, local models, etc.).

Switch Virtues EN and Scenarii EN translation configs from gpt-5.4-mini to
gpt-5.5 via direct OpenAI API for best translation quality per benchmark.
Add .keys/ to .gitignore for API key storage.

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

@clusterManager-Myia clusterManager-Myia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean multi-provider support. BaseUrl property properly wired with null checks, MaxOutputTokens correctly maps to ChatCompletionOptions.MaxOutputTokenCount. Switching EN translations to gpt-5.5 with reduced chunk size (8 to 4) for quality is a reasonable tradeoff. .keys/ addition to .gitignore is correct.

@clusterManager-Myia clusterManager-Myia left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[NanoClaw] LGTM

Multi-provider API support is clean. BaseUrl nullable with conditional OpenAIClientOptions branching is the right pattern. MaxOutputTokens properly threaded. Config updates consistent with benchmarks. .keys/ in .gitignore is appropriate. Tests pass (120/120 non-skipped).

@myia-ai-01 myia-ai-01 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review ai-01 — APPROVE ✅

Refactor surgical et propre. Convention review checklist :

  • Diff sanity : +35/-7, 4 fichiers, scope strictement DatasetUpdater config + Prompt factory. Aucun change CSV/prompts.
  • Fallback OpenAI préservé : if (string.IsNullOrEmpty(BaseUrl)) branch garde le constructeur historique OpenAIClient(ApiKey) intact.
  • Endpoint configurable : BaseUrl? nullable, threaded proprement de DatasetUpdaterConfigPromptOpenAIClientOptions.Endpoint. Compatible OpenRouter ou tout endpoint OpenAI-compatible.
  • Sécurité : .keys/ dans .gitignore, OpenAIKeyPath config-driven (pas d'inline secret). Aucune fuite dans le diff.
  • CI 3/3 SUCCESS (Debug + Release + GitGuardian).
  • Tests : 120 pass / 0 fail / 5 skip (cf. PR body).
  • ChunkSize 8 → 4 cohérent avec passage à modèle plus puissant (meilleur contrôle qualité par chunk).
  • MaxOutputTokens 4096 raisonnable pour translations Scenarii/Virtues.

Notes / suggestions (non-bloquantes)

  1. Logging startup : utile de logger le BaseUrl effectif au démarrage du run pour debug (sans la clé, juste l'endpoint). Peut être ajouté en suivi.
  2. Doc XML : BaseUrl mériterait un <summary> indiquant format attendu (avec ou sans /v1, trailing slash). Pas bloquant.
  3. Test plan manuel (cf. body PR) : confirmer pilot 3-5 records EN avant lancement full 76+76 records. Cohérent avec smoke test plan ai-01 cycle 39.
  4. Décision benchmark mise à jour : OpenAI gpt-5.5 direct retenu plutôt que OpenRouter claude-sonnet-4 (cycle 24). Cohérent avec second benchmark po-2023 (qualité supérieure, coût ~$1 pour 258 records). À mettre à jour dans cycle25-glossary/translation-glossary.md post-merge.

Impact attendu

  • Phase 1 EN : débloquée — Scenarii (76 records) + Virtues (gaps EN comblés via gpt-5.5)
  • Phase 1 PT : pas adressée par cette PR mais infrastructure BaseUrl permet futurs switches sans nouveau code
  • #211 (Rules PT) : pas adressée, pré-requis re-run PT post #297 prompt fix

Prêt à merger côté review ai-01. jsboige : à toi la décision finale (ordre vs PR #301 pending merge).

@jsboige
jsboige merged commit 840d182 into master May 18, 2026
3 checks passed
@jsboige
jsboige deleted the feat/dataset-updater-gpt55-multi-provider branch June 1, 2026 21:41
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.

3 participants