feat/social-games-elo-eval - #342
Conversation
with minor bugs, will fix in future iterations
contain minor bugs, will fix in future iterations
Fixes several bugs preventing custom models (via custom/model@url format) from working:
- Fix parameter name in generate.py: api_base → base_url (line 257)
- Fix hardcoded "gpt-4" evaluator models in server.py (lines 309, 401)
Now uses model_dict.get("evaluator", model_dict["env"])
- Add markdown code block stripping in PydanticOutputParser
Many local LLMs wrap JSON in ```json...```, parser now handles this
- Fix format_bad_output to support custom models
Passes base_url/api_key through error recovery path
Conditionally uses response_format (custom servers may not support it)
Merge branch 'fix/custom-model-support' into feature/social-game-support
…ility issues in the game
Refactor SocialDeductionGame for real-time history and cleaner prompts
- ParallelSotopiaEnv: Added `include_turn_marker` flag to control environment turn messages.
- SocialDeductionGame:
- Disabled environment turn markers to avoid duplication.
- Implemented real-time history appending via `recv_message` override and `agent_message_buffer`.
- Populated `action_instruction` in `Observation` for dynamic prompt instructions.
- Observation: Added `action_instruction` field.
- generate.py: Added `fill_template` helper for partial string formatting.
- LLMAgent: Updated `aact` to use `fill_template` to inject `action_instructions` into `custom_template`.
- Werewolves: Updated config description to populate `{agent_names}` dynamically.
next step, change script_like to false, and fix the rest errors that may cause
…_Sell_custom_models.py
previous commit reverted too much..
Add structured_output parameter to agenerate_action() with fallback retry when structured output fails (e.g., for models that don't support response_schema).
|
Thanks for the substantial work here. I took a pass over the current head ( For this to be mergeable, I would like it reduced to a minimal, backward-compatible PR:
There are also several concrete blockers in the current branch:
Ruff passes. The broad pytest run was inconclusive locally because parts of the existing suite require an external model endpoint and a specific Redis setup. I also did not find new tests for the shared engine, game state machines, or Elo calculation. My preferred next step is therefore: a small rebased engine PR with backward-compatibility tests first, followed by separately reviewable game and evaluation PRs. |
Closes #
📑 Description
✅ Checks
type/descript(e.g.feature/add-llm-agents)ℹ Additional Information