RayMelius Claude Opus 4.6 commited on
Commit
766b49e
Β·
1 Parent(s): 7aaffc9

Fix Gemini conversations: bump LLM budget to 2 and remove double probability gate

Browse files

With budget=1, action decisions consumed the entire per-tick allowance,
leaving zero budget for conversations. Also, active conversations were
gated by llm_call_probability on every turn β€” now they always continue
once started.

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

src/soci/api/server.py CHANGED
@@ -115,9 +115,10 @@ async def simulation_loop(sim: Simulation, db: Database, tick_delay: float = 2.0
115
  sim._skip_llm_this_tick = False
116
  if is_rate_limited:
117
  # Rate-limited providers: tight budget β€” probability slider does the fine-tuning.
118
- # Gemini free tier: 4 RPM, ~1500 RPD β†’ budget=1 + prob=0.45 β‰ˆ 150 calls/h (10h).
 
119
  sim._max_convos_this_tick = 1
120
- sim._max_llm_calls_this_tick = 1
121
  else:
122
  # Ollama / Claude: soft cap to keep ticks responsive
123
  sim._max_convos_this_tick = 3
 
115
  sim._skip_llm_this_tick = False
116
  if is_rate_limited:
117
  # Rate-limited providers: tight budget β€” probability slider does the fine-tuning.
118
+ # Gemini free tier: 4 RPM, ~1500 RPD β†’ budget=2 + prob=0.10 β‰ˆ 15 calls/h.
119
+ # Budget=2 so 1 action + 1 conversation can co-exist per tick.
120
  sim._max_convos_this_tick = 1
121
+ sim._max_llm_calls_this_tick = 2
122
  else:
123
  # Ollama / Claude: soft cap to keep ticks responsive
124
  sim._max_convos_this_tick = 3
src/soci/engine/simulation.py CHANGED
@@ -279,7 +279,9 @@ class Simulation:
279
  if next_speaker_id:
280
  responder = self.agents.get(next_speaker_id[0])
281
  other = self.agents.get(last_speaker) if last_speaker else None
282
- if responder and other and random.random() < self.llm_call_probability:
 
 
283
  conv_coros.append(
284
  continue_conversation(conv, responder, other, self.llm, self.clock)
285
  )
 
279
  if next_speaker_id:
280
  responder = self.agents.get(next_speaker_id[0])
281
  other = self.agents.get(last_speaker) if last_speaker else None
282
+ if responder and other:
283
+ # Always continue active conversations β€” they already passed
284
+ # the probability gate when initiated; don't double-gate them.
285
  conv_coros.append(
286
  continue_conversation(conv, responder, other, self.llm, self.clock)
287
  )