Skip to content

Conversation

@Keyu-He
Copy link
Collaborator

@Keyu-He Keyu-He commented Oct 3, 2025

📑 Description

✅ Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed
  • Branch name follows type/descript (e.g. feature/add-llm-agents)
  • Ready for code review

ℹ Additional Information

Keyu-He and others added 22 commits September 21, 2025 01:10
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
@Keyu-He Keyu-He requested a review from XuhuiZhou December 7, 2025 04:08
Found and fix the evaluation and generation error on the negotiation arena examples.

- **Termination Fix**: Updated `ParallelSotopiaEnv` to pass the `env` instance to evaluators. Modified `RuleBasedTerminatedEvaluator` to correctly count active agents using `env.agents` instead of relying solely on message history, which caused early termination in the first turn.
- **LiteLLM Support**: Updated `generate.py` to handle OpenAI schema limitations. Added `_fix_schema` to convert `prefixItems` (tuples) to `items` (arrays) and set `strict=False` to support dynamic dictionary outputs (Evaluator maps) while preventing `BadRequestError`.
@Keyu-He Keyu-He requested a review from ProKil December 7, 2025 07:42
@XuhuiZhou XuhuiZhou mentioned this pull request Dec 25, 2025
6 tasks
@XuhuiZhou XuhuiZhou closed this Jan 7, 2026
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.

2 participants