fix(model): wire openai_compatible configuration across trainer, eval, and config pipeline - #262
Open
RohithPariki wants to merge 3 commits into
Open
Conversation
…, and config pipeline
RohithPariki
marked this pull request as ready for review
August 29, 2026 00:21
Contributor
|
Thanks — the new OpenAI-compatible fields flatten and reach the runtime configurator, but current head still has several entry-point gaps:
Please wire these paths consistently while preserving explicit per-role model overrides, and add regressions for train CLI backend selection, eval-only |
Contributor
Author
|
Thanks Yifan Yang (@Yif-Yang) for the detailed review! I have addressed all 4 points in commit
|
… fresh-import regression
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR connects the generic
openai_compatiblebackend across the configuration, trainer, and evaluation pipelines so that models served via OpenAI-compatible endpoints (such as DeepSeek, Groq, Together AI, vLLM, Ollama, LiteLLM, or local servers) can be fully configured via YAML configs,--cfg-options, or CLI flags and properly initialized during training and evaluation runs.Key Changes
skillopt/config.py): Added all 18model.openai_compatible_*mappings to_FLATTEN_MAPso YAML configs retain general and per-role (optimizer_/target_) settings during flattening.skillopt/model/openai_compatible_backend.py&skillopt/model/__init__.py): Extendedconfigure_openai_compatibleto support per-role overrides fortemperature,timeout_seconds, andmax_tokensacrossOPTIMIZER_CONFIGandTARGET_CONFIG.skillopt/engine/trainer.py): Addedconfigure_openai_compatible(...)call duringReflACTTrainer.train()initialization so parameters configured via YAML or CLI take effect during training and episode rollouts.scripts/eval_only.py): Added"openai_compatible","qwen", and"qwen_chat"to--backendchoices, added CLI flags, mapped them to structured keys inload_config, and invokedconfigure_openai_compatibleinmain().scripts/train.py): Added CLI arguments foropenai_compatible_*, mapped them in_LEGACY_TO_STRUCTURED, and added environment variable guidance (OPENAI_COMPATIBLE_API_KEY) for secure credential passing.tests/test_openai_compatible_config.py&tests/test_openai_compatible_backend.py): Added comprehensive test coverage for YAML config flattening, CLI overrides, role separation, trainer initialization, credential warnings, and eval_only script parsing.Verification
pytest tests/test_openai_compatible_config.py tests/test_openai_compatible_backend.py tests/test_azure_openai_compat.py tests/test_minimax_backend.py tests/test_minimax_region.py tests/test_qwen_backend.py tests/test_role_backend_resolution.py tests/test_codex_config_aliases.py tests/test_retired_cli_options.py tests/test_env_section_survives_dedup.py). All 175 tests passed.