fix: rename stale OpenaiConfig references to APIServerConfig

Three environment files still imported the old `OpenaiConfig` name,
which was renamed to `APIServerConfig`. This causes an ImportError
at module load time, making these environments unusable:

- environments/sft_loader_server.py
- environments/community/ufc_prediction_env/ufc_server.py
- environments/community/ufc_prediction_env/ufc_image_env.py

Also adds a lightweight import regression test.
This commit is contained in:
skyc1e 2026-04-14 00:20:27 +02:00
parent c20c85256e
commit 388137c3f1
No known key found for this signature in database
4 changed files with 33 additions and 11 deletions

View file

@ -0,0 +1,22 @@
"""Regression tests for environment module imports.
Ensures every environment module can be imported without errors
(e.g. no stale references to renamed symbols like OpenaiConfig).
"""
import importlib
import pytest
@pytest.mark.parametrize(
"module_path",
[
"environments.sft_loader_server",
"environments.community.ufc_prediction_env.ufc_server",
"environments.community.ufc_prediction_env.ufc_image_env",
],
)
def test_environment_module_imports(module_path):
"""Each environment module should import without ImportError."""
importlib.import_module(module_path)