codee-agent 0.9.1__py3-none-any.whl → 0.9.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
codee/admin.py CHANGED
@@ -125,6 +125,8 @@ class ModelOption(BaseModel):
125
125
  has none, and ``default_effort`` the one it runs at when the skill sets
126
126
  none, empty when the agent doesn't say. ``effort_label`` names levels that
127
127
  aren't a reasoning effort (Copilot Auto's tiers), empty otherwise.
128
+ ``context_tiers`` are ``[value, label]`` pairs for the context windows the
129
+ model offers, the default first, and empty when there is no choice.
128
130
  """
129
131
 
130
132
  id: str
@@ -132,6 +134,7 @@ class ModelOption(BaseModel):
132
134
  efforts: list[str] = []
133
135
  default_effort: str = ""
134
136
  effort_label: str = ""
137
+ context_tiers: list[list[str]] = []
135
138
 
136
139
 
137
140
  class ConversationMessage(BaseModel):
@@ -385,6 +388,8 @@ class AdminState(rx.State):
385
388
  skill_model: str = ""
386
389
  # The skill's `effort:`, empty for the model's own default.
387
390
  skill_effort: str = ""
391
+ # The skill's `x-codee-context-tier:`, empty for the default window.
392
+ skill_context_tier: str = ""
388
393
  # The agent code the skill declares, empty for the default agent.
389
394
  skill_agent: str = ""
390
395
  skill_type: str = "knowledge"
@@ -648,6 +653,29 @@ class AdminState(rx.State):
648
653
  return bool(self.skill_effort) and (
649
654
  model is None or self.skill_effort not in model.efforts)
650
655
 
656
+ @rx.var
657
+ def skill_context_choices(self) -> list[list[str]]:
658
+ """``[value, label]`` for each context window the picked model offers.
659
+
660
+ Empty, and the picker hidden, for a model with no choice of window. A
661
+ tier the skill already carries is always listed, as with effort.
662
+ """
663
+ model = _model_option(self.agent_models, self.skill_model)
664
+ choices = [list(tier) for tier in model.context_tiers] if model else []
665
+ if (self.skill_context_tier
666
+ and all(value != self.skill_context_tier
667
+ for value, _ in choices)):
668
+ choices.append([self.skill_context_tier, self.skill_context_tier])
669
+ return choices
670
+
671
+ @rx.var
672
+ def skill_context_value(self) -> str:
673
+ """The context picker's value: the skill's tier, or the default one."""
674
+ model = _model_option(self.agent_models, self.skill_model)
675
+ if self.skill_context_tier or not (model and model.context_tiers):
676
+ return self.skill_context_tier
677
+ return model.context_tiers[0][0]
678
+
651
679
  @rx.var
652
680
  def custom_model_query(self) -> str:
653
681
  """The search text when it names no known model, so it can be used as-is."""
@@ -716,6 +744,7 @@ class AdminState(rx.State):
716
744
  self.skill_agent = agent
717
745
  self.skill_model = ""
718
746
  self.skill_effort = ""
747
+ self.skill_context_tier = ""
719
748
  self.model_query = ""
720
749
  return AdminState.load_agent_models
721
750
 
@@ -725,19 +754,31 @@ class AdminState(rx.State):
725
754
  def choose_model(self, model_id: str) -> None:
726
755
  """Pick a model from the list, or use whatever the user typed.
727
756
 
728
- An effort the newly picked model is known not to take is cleared, since
729
- it would only make that model's run fail. One the catalog can't vouch
730
- either way for stays, and the picker keeps showing it.
757
+ An effort or context window the newly picked model is known not to
758
+ take is cleared, since it would only make that model's run fail. One
759
+ the catalog can't vouch either way for stays, and the picker keeps
760
+ showing it.
731
761
  """
732
762
  self.skill_model = model_id.strip()
733
763
  self.model_query = ""
734
764
  model = _model_option(self.agent_models, self.skill_model)
735
- if model is not None and self.skill_effort not in model.efforts:
765
+ if model is None:
766
+ return
767
+ if self.skill_effort not in model.efforts:
736
768
  self.skill_effort = ""
769
+ if all(value != self.skill_context_tier
770
+ for value, _ in model.context_tiers):
771
+ self.skill_context_tier = ""
737
772
 
738
773
  def set_skill_effort(self, value: str) -> None:
739
774
  self.skill_effort = "" if value == EFFORT_DEFAULT else value
740
775
 
776
+ def set_skill_context_tier(self, value: str) -> None:
777
+ """Pick a context window; the model's default one is stored as unset."""
778
+ model = _model_option(self.agent_models, self.skill_model)
779
+ default = model.context_tiers[0][0] if model and model.context_tiers else ""
780
+ self.skill_context_tier = "" if value == default else value
781
+
741
782
  @rx.event(background=True)
742
783
  async def load_agent_models(self) -> None:
743
784
  """Fetch the catalog of the agent this skill runs on, off the event loop.
@@ -814,6 +855,7 @@ class AdminState(rx.State):
814
855
  self.skill_description = skill["description"]
815
856
  self.skill_model = skill["model"]
816
857
  self.skill_effort = skill["effort"]
858
+ self.skill_context_tier = skill["context_tier"]
817
859
  self.skill_agent = skill["agent"]
818
860
  self.model_query = ""
819
861
  self.skill_type = skill["type"]
@@ -839,6 +881,7 @@ class AdminState(rx.State):
839
881
  "description": self.skill_description,
840
882
  "model": self.skill_model,
841
883
  "effort": self.skill_effort,
884
+ "context_tier": self.skill_context_tier,
842
885
  "agent": self.skill_agent,
843
886
  "type": self.skill_type,
844
887
  "cron": self.skill_cron,
@@ -2765,6 +2808,32 @@ def effort_picker() -> rx.Component:
2765
2808
  flex="1", min_width="0"))
2766
2809
 
2767
2810
 
2811
+ def context_picker() -> rx.Component:
2812
+ """Context window for the picked model, shown only when it offers a choice."""
2813
+ return rx.cond(
2814
+ AdminState.skill_context_choices.length() > 0,
2815
+ rx.box(field(
2816
+ "Context window",
2817
+ rx.select.root(
2818
+ rx.select.trigger(width="100%"),
2819
+ rx.select.content(
2820
+ rx.foreach(AdminState.skill_context_choices,
2821
+ lambda choice: rx.select.item(
2822
+ choice[1], value=choice[0]))),
2823
+ value=AdminState.skill_context_value,
2824
+ on_change=AdminState.set_skill_context_tier),
2825
+ rx.text(
2826
+ rx.cond(
2827
+ AdminState.skill_context_tier == "",
2828
+ "Runs on the model's default window.",
2829
+ rx.fragment("Saved as ",
2830
+ rx.code("x-codee-context-tier: ",
2831
+ AdminState.skill_context_tier),
2832
+ " in the skill frontmatter.")),
2833
+ color=MUTED, font_size="0.82rem")),
2834
+ flex="1", min_width="0"))
2835
+
2836
+
2768
2837
  def delete_skill_dialog() -> rx.Component:
2769
2838
  return rx.alert_dialog.root(
2770
2839
  rx.alert_dialog.trigger(
@@ -2805,10 +2874,11 @@ def skill_editor() -> rx.Component:
2805
2874
  on_change=AdminState.set_skill_description,
2806
2875
  width="100%", min_height="5rem")),
2807
2876
  rx.grid(agent_picker(),
2808
- # Effort shares the model's column; the model takes all of it
2809
- # when the picked model has no effort levels.
2877
+ # Effort and context window share the model's column; the
2878
+ # model takes all of it when the picked model has neither.
2810
2879
  rx.flex(rx.box(model_picker(), flex="1", min_width="0"),
2811
2880
  effort_picker(),
2881
+ context_picker(),
2812
2882
  direction=rx.breakpoints(initial="column", sm="row"),
2813
2883
  gap="1rem", align="start", width="100%"),
2814
2884
  columns=rx.breakpoints(initial="1", md="2"), gap="1rem",
codee/admin_service.py CHANGED
@@ -88,6 +88,7 @@ MANAGED = {
88
88
  "model",
89
89
  "effort",
90
90
  "disable-model-invocation",
91
+ "x-codee-context-tier",
91
92
  "cron",
92
93
  "x-codee-agent",
93
94
  "x-codee-trigger",
@@ -638,6 +639,8 @@ def _skill_run_summary(
638
639
  ]
639
640
  if skill.effort:
640
641
  lines.append(f"Effort: {skill.effort}")
642
+ if skill.context_tier:
643
+ lines.append(f"Context: {skill.context_tier}")
641
644
  lines.append(f"Skill: {skill.name}")
642
645
  return lines
643
646
 
@@ -977,6 +980,8 @@ class AdminService:
977
980
  "agent": _agent_code(frontmatter.get("x-codee-agent", "")),
978
981
  "model": str(frontmatter.get("model", "") or "").strip(),
979
982
  "effort": str(frontmatter.get("effort", "") or "").strip(),
983
+ "context_tier": str(frontmatter.get(
984
+ "x-codee-context-tier", "") or "").strip(),
980
985
  "issue_status": _format_issue_status(
981
986
  frontmatter.get("x-codee-issue-status", [])
982
987
  ),
@@ -1030,7 +1035,8 @@ class AdminService:
1030
1035
  return [{"id": model.id, "name": model.name,
1031
1036
  "efforts": list(model.efforts),
1032
1037
  "default_effort": model.default_effort,
1033
- "effort_label": model.effort_label}
1038
+ "effort_label": model.effort_label,
1039
+ "context_tiers": [list(tier) for tier in model.context_tiers]}
1034
1040
  for model in models]
1035
1041
 
1036
1042
  def resolve_skill_slug(self, label: str) -> str:
@@ -1782,6 +1788,7 @@ class AdminService:
1782
1788
  "description": str(frontmatter.get("description", "")),
1783
1789
  "model": str(frontmatter.get("model", "") or ""),
1784
1790
  "effort": str(frontmatter.get("effort", "") or ""),
1791
+ "context_tier": str(frontmatter.get("x-codee-context-tier", "") or ""),
1785
1792
  "agent": _agent_code(frontmatter.get("x-codee-agent", "")),
1786
1793
  "type": infer_skill_type(frontmatter),
1787
1794
  "cron": str(frontmatter.get("x-codee-cron", frontmatter.get("cron", "0 0 * * *"))),
@@ -1825,9 +1832,10 @@ class AdminService:
1825
1832
  "name": name,
1826
1833
  "description": skill["description"],
1827
1834
  }
1828
- # All three are left out entirely when unset, so the skill keeps
1829
- # running on the default agent, whatever model that agent defaults to
1830
- # and that model's own effort, rather than on an empty value.
1835
+ # These are left out entirely when unset, so the skill keeps running on
1836
+ # the default agent, whatever model that agent defaults to, that
1837
+ # model's own effort and its default context window, rather than on an
1838
+ # empty value.
1831
1839
  agent = skill.get("agent", "").strip()
1832
1840
  if agent:
1833
1841
  if resolve_agent_code(agent) is None:
@@ -1839,6 +1847,9 @@ class AdminService:
1839
1847
  effort = skill.get("effort", "").strip()
1840
1848
  if effort:
1841
1849
  frontmatter["effort"] = effort
1850
+ context_tier = skill.get("context_tier", "").strip()
1851
+ if context_tier and context_tier != "default":
1852
+ frontmatter["x-codee-context-tier"] = context_tier
1842
1853
  skill_type = skill["type"]
1843
1854
  if skill_type == "slash command":
1844
1855
  frontmatter["disable-model-invocation"] = True
codee/executor.py CHANGED
@@ -292,12 +292,14 @@ def _pull_latest_code() -> bool:
292
292
 
293
293
 
294
294
  def _run_agent(user_message: str, session_id: str, model: str = "",
295
- agent_code: str = "", label: str = "", effort: str = "") -> str:
295
+ agent_code: str = "", label: str = "", effort: str = "",
296
+ context_tier: str = "") -> str:
296
297
  """Run the skill's coding agent and return its response text.
297
298
 
298
299
  ``model`` comes from the triggering skill's ``model:`` frontmatter; agents
299
300
  that can't be told which model to use ignore it. ``effort`` comes from its
300
- ``effort:`` frontmatter the same way. ``agent_code`` comes from
301
+ ``effort:`` frontmatter the same way, and ``context_tier`` from its
302
+ ``x-codee-context-tier:``. ``agent_code`` comes from
301
303
  its ``x-codee-agent:`` frontmatter and picks which agent runs at all, empty
302
304
  for the default one. Wraps the agent run in job tracking; the agent itself
303
305
  raises on any failure so callers can retry.
@@ -311,8 +313,8 @@ def _run_agent(user_message: str, session_id: str, model: str = "",
311
313
  agent=agent.DISPLAY_NAME,
312
314
  model=model, main_context=context)
313
315
  log.debug("job %s started: session=%s message=%r model=%r effort=%r "
314
- "agent=%s", job_id, session_id, user_message, model, effort,
315
- agent.describe())
316
+ "context_tier=%r agent=%s", job_id, session_id, user_message,
317
+ model, effort, context_tier, agent.describe())
316
318
 
317
319
  def opened(agent_session_id: str) -> None:
318
320
  """Record the session the agent actually opened, if it isn't ours.
@@ -330,7 +332,8 @@ def _run_agent(user_message: str, session_id: str, model: str = "",
330
332
 
331
333
  _job_scope.job_id = job_id
332
334
  try:
333
- return agent.run(user_message, session_id, model, opened, effort)
335
+ return agent.run(user_message, session_id, model, opened, effort,
336
+ context_tier)
334
337
  except Exception:
335
338
  # The agent exits however SIGTERM makes it exit, usually as a failure.
336
339
  # Asked for from the dashboard, that is a kill and not worth a retry.
@@ -352,7 +355,7 @@ def _run_agent(user_message: str, session_id: str, model: str = "",
352
355
 
353
356
  def _run_task(task_id: str, message: str, session_id: str, skill_name: str,
354
357
  model: str = "", agent_code: str = "", label: str = "",
355
- effort: str = "") -> None:
358
+ effort: str = "", context_tier: str = "") -> None:
356
359
  """Pool worker: run one task's coding agent, then release its in-flight slot.
357
360
 
358
361
  Logs the outcome to the runs table like the cron/email/sqs triggers do, so
@@ -368,7 +371,7 @@ def _run_task(task_id: str, message: str, session_id: str, skill_name: str,
368
371
  shown = label or message
369
372
  try:
370
373
  response = _run_agent(message, session_id, model, agent_code, label,
371
- effort)
374
+ effort, context_tier)
372
375
  log.info("Agent response for %s (%d chars): %s",
373
376
  task_id, len(response), response)
374
377
  runs_db.record_run(skill_name, "issue", session_id, "succeeded",
@@ -399,7 +402,7 @@ def _run_task(task_id: str, message: str, session_id: str, skill_name: str,
399
402
 
400
403
  def _submit_task(task_id: str, message: str, session_id: str, skill_name: str,
401
404
  model: str = "", agent_code: str = "", label: str = "",
402
- effort: str = "") -> bool:
405
+ effort: str = "", context_tier: str = "") -> bool:
403
406
  """Start a task's agent unless one is already in flight or we're at the cap.
404
407
 
405
408
  Returns True if launched, False if skipped — as a duplicate, or because
@@ -426,7 +429,7 @@ def _submit_task(task_id: str, message: str, session_id: str, skill_name: str,
426
429
  # killing it mid-run, which is what the thread pool used to give us.
427
430
  threading.Thread(target=_run_task, name=f"task-agent-{task_id}",
428
431
  args=(task_id, message, session_id, skill_name, model,
429
- agent_code, label, effort)).start()
432
+ agent_code, label, effort, context_tier)).start()
430
433
  log.info("Started an agent for %s (%d running, max %d).",
431
434
  task_id, depth, limit)
432
435
  return True
@@ -528,7 +531,8 @@ def run_once() -> None:
528
531
  task_id, status, issue_type, summary, session_id)
529
532
 
530
533
  _submit_task(task_id, message, session_id, skill.name,
531
- skill.model, skill.agent, label, skill.effort)
534
+ skill.model, skill.agent, label, skill.effort,
535
+ skill.context_tier)
532
536
 
533
537
 
534
538
  def main() -> None:
@@ -172,7 +172,8 @@ class CronSkillTests(unittest.TestCase):
172
172
  calls = []
173
173
 
174
174
  def run_claude(message: str, session_id: str, model: str = "",
175
- agent: str = "", effort: str = "") -> str:
175
+ agent: str = "", effort: str = "",
176
+ context_tier: str = "") -> str:
176
177
  calls.append((model, agent))
177
178
  return "done"
178
179
 
@@ -204,7 +205,8 @@ class CronSkillTests(unittest.TestCase):
204
205
  calls = []
205
206
 
206
207
  def run_claude(message: str, session_id: str, model: str = "",
207
- agent: str = "", effort: str = "") -> str:
208
+ agent: str = "", effort: str = "",
209
+ context_tier: str = "") -> str:
208
210
  calls.append((message, session_id))
209
211
  return "done"
210
212
 
@@ -239,7 +241,8 @@ class CronSkillTests(unittest.TestCase):
239
241
  calls = []
240
242
 
241
243
  def run_claude(message: str, session_id: str, model: str = "",
242
- agent: str = "", effort: str = "") -> str:
244
+ agent: str = "", effort: str = "",
245
+ context_tier: str = "") -> str:
243
246
  calls.append(session_id)
244
247
  if len(calls) == 1:
245
248
  raise RuntimeError("over limit")
@@ -275,7 +278,8 @@ class CronSkillTests(unittest.TestCase):
275
278
  calls = []
276
279
 
277
280
  def run_claude(message: str, session_id: str, model: str = "",
278
- agent: str = "", effort: str = "") -> str:
281
+ agent: str = "", effort: str = "",
282
+ context_tier: str = "") -> str:
279
283
  calls.append(session_id)
280
284
  raise runs_db.JobKilled()
281
285
 
@@ -321,7 +325,8 @@ class CronSkillTests(unittest.TestCase):
321
325
  calls = []
322
326
 
323
327
  def run_claude(message: str, session_id: str, model: str = "",
324
- agent: str = "", effort: str = "") -> str:
328
+ agent: str = "", effort: str = "",
329
+ context_tier: str = "") -> str:
325
330
  calls.append((message, session_id))
326
331
  return "done"
327
332
 
@@ -379,7 +384,8 @@ class CronSkillTests(unittest.TestCase):
379
384
  calls = []
380
385
 
381
386
  def run_claude(message: str, session_id: str, model: str = "",
382
- agent: str = "", effort: str = "") -> str:
387
+ agent: str = "", effort: str = "",
388
+ context_tier: str = "") -> str:
383
389
  calls.append((message, session_id))
384
390
  return "done"
385
391
 
@@ -415,7 +421,8 @@ class CronSkillTests(unittest.TestCase):
415
421
  calls = []
416
422
 
417
423
  def run_claude(message: str, session_id: str, model: str = "",
418
- agent: str = "", effort: str = "") -> str:
424
+ agent: str = "", effort: str = "",
425
+ context_tier: str = "") -> str:
419
426
  calls.append(session_id)
420
427
  return "done"
421
428
 
@@ -456,7 +463,8 @@ class CronSkillTests(unittest.TestCase):
456
463
  calls = []
457
464
 
458
465
  def run_claude(message: str, session_id: str, model: str = "",
459
- agent: str = "", effort: str = "") -> str:
466
+ agent: str = "", effort: str = "",
467
+ context_tier: str = "") -> str:
460
468
  calls.append(session_id)
461
469
  raise RuntimeError("over limit")
462
470
 
@@ -488,15 +496,18 @@ class CronSkillTests(unittest.TestCase):
488
496
  calls = []
489
497
 
490
498
  def run_claude(message: str, session_id: str, model: str = "",
491
- agent: str = "", effort: str = "") -> str:
492
- calls.append((model, effort))
499
+ agent: str = "", effort: str = "",
500
+ context_tier: str = "") -> str:
501
+ calls.append((model, effort, context_tier))
493
502
  return "done"
494
503
 
495
504
  with tempfile.TemporaryDirectory() as temp_dir:
496
505
  root = Path(temp_dir)
497
506
  skills_dir = root / "skills"
498
507
  for slug, model_line in (("with-model", "model: claude-opus-5\n"
499
- "effort: high\n"),
508
+ "effort: high\n"
509
+ "x-codee-context-tier: "
510
+ "long_context\n"),
500
511
  ("without-model", "")):
501
512
  skill_dir = skills_dir / slug
502
513
  skill_dir.mkdir(parents=True)
@@ -516,7 +527,8 @@ class CronSkillTests(unittest.TestCase):
516
527
  main_context=_ctx(root))
517
528
 
518
529
  # Sorted by directory name, so the skill declaring a model comes first.
519
- self.assertEqual(calls, [("claude-opus-5", "high"), ("", "")])
530
+ self.assertEqual(calls, [("claude-opus-5", "high", "long_context"),
531
+ ("", "", "")])
520
532
 
521
533
  def test_reconcile_runs_one_aws_sqs_message_per_tick(self):
522
534
  calls = []
@@ -528,7 +540,8 @@ class CronSkillTests(unittest.TestCase):
528
540
  sqs_source = FakeSqsMessageSource([message])
529
541
 
530
542
  def run_claude(user_message: str, session_id: str, model: str = "",
531
- agent: str = "", effort: str = "") -> str:
543
+ agent: str = "", effort: str = "",
544
+ context_tier: str = "") -> str:
532
545
  calls.append((user_message, session_id))
533
546
  return "done"
534
547
 
@@ -568,7 +581,8 @@ class CronSkillTests(unittest.TestCase):
568
581
  sqs_source = FakeSqsMessageSource([message])
569
582
 
570
583
  def run_claude(user_message: str, session_id: str, model: str = "",
571
- agent: str = "", effort: str = "") -> str:
584
+ agent: str = "", effort: str = "",
585
+ context_tier: str = "") -> str:
572
586
  raise runs_db.JobKilled()
573
587
 
574
588
  with tempfile.TemporaryDirectory() as temp_dir:
@@ -599,7 +613,8 @@ class CronSkillTests(unittest.TestCase):
599
613
 
600
614
  def test_reconcile_survives_unconfigured_aws_client(self):
601
615
  def run_claude(user_message: str, session_id: str, model: str = "",
602
- agent: str = "", effort: str = "") -> str:
616
+ agent: str = "", effort: str = "",
617
+ context_tier: str = "") -> str:
603
618
  raise AssertionError("should not run without an SQS client")
604
619
 
605
620
  with tempfile.TemporaryDirectory() as temp_dir:
@@ -70,7 +70,8 @@ class EmailTriggerTests(unittest.TestCase):
70
70
  patch.object(module.runs_db, "record_run").start()
71
71
  self.addCleanup(patch.stopall)
72
72
 
73
- def run_claude(self, prompt, session_id, model, agent, effort=""):
73
+ def run_claude(self, prompt, session_id, model, agent, effort="",
74
+ context_tier=""):
74
75
  self.prompts.append(prompt)
75
76
  return "ok"
76
77
 
@@ -24,6 +24,7 @@ class AwsSqsTriggeredSkill:
24
24
  model: str
25
25
  agent: str = ""
26
26
  effort: str = ""
27
+ context_tier: str = ""
27
28
 
28
29
 
29
30
  @dataclass(frozen=True)
@@ -76,7 +77,8 @@ def trigger_aws_sqs_skills(
76
77
  prompt = render_aws_sqs_prompt(skill.body, message.content)
77
78
  try:
78
79
  response = run_claude(prompt, session_id, skill.model, skill.agent,
79
- effort=skill.effort)
80
+ effort=skill.effort,
81
+ context_tier=skill.context_tier)
80
82
  print(
81
83
  f"[aws_sqs_skills] Claude response for {skill.name} ({len(response)} chars)")
82
84
  sqs_message_source.delete(message)
@@ -144,6 +146,7 @@ def find_aws_sqs_triggered_skills(skills_dir: Path = SKILLS_DIR) -> list[AwsSqsT
144
146
  model=metadata.get("model", "").strip(),
145
147
  agent=metadata.get("x-codee-agent", "").strip(),
146
148
  effort=metadata.get("effort", "").strip(),
149
+ context_tier=metadata.get("x-codee-context-tier", "").strip(),
147
150
  )
148
151
  )
149
152
  return skills
@@ -21,9 +21,10 @@ SKILLS_DIR = default_skills_dir(REPO_ROOT)
21
21
  DEFAULT_CATCHUP = timedelta(hours=24)
22
22
 
23
23
 
24
- # (prompt, session_id, model, agent, *, effort) -> agent reply. `model` is the
25
- # skill's `model:` frontmatter, `agent` its `x-codee-agent:` and `effort` its
26
- # `effort:`, each empty when the skill declares none.
24
+ # (prompt, session_id, model, agent, *, effort, context_tier) -> agent reply.
25
+ # `model` is the skill's `model:` frontmatter, `agent` its `x-codee-agent:`,
26
+ # `effort` its `effort:` and `context_tier` its `x-codee-context-tier:`, each
27
+ # empty when the skill declares none.
27
28
  RunClaude = Callable[..., str]
28
29
 
29
30
 
@@ -43,6 +44,7 @@ class ScheduledSkill:
43
44
  model: str
44
45
  agent: str = ""
45
46
  effort: str = ""
47
+ context_tier: str = ""
46
48
 
47
49
 
48
50
  def _get_force_file_path(main_context: CodeeMainContext) -> Path:
@@ -122,7 +124,8 @@ def trigger_cron_skills(
122
124
  session_id = str(uuid.uuid4())
123
125
  try:
124
126
  response = run_claude(skill.body, session_id, skill.model,
125
- skill.agent, effort=skill.effort)
127
+ skill.agent, effort=skill.effort,
128
+ context_tier=skill.context_tier)
126
129
  print(
127
130
  f"[cron_skills] Claude response for {skill.name} ({len(response)} chars)")
128
131
  runs_db.record_run(skill.name, "cron", session_id,
@@ -212,6 +215,7 @@ def _find_scheduled_skills(skills_dir: Path = SKILLS_DIR) -> list[ScheduledSkill
212
215
  model=metadata.get("model", "").strip(),
213
216
  agent=metadata.get("x-codee-agent", "").strip(),
214
217
  effort=metadata.get("effort", "").strip(),
218
+ context_tier=metadata.get("x-codee-context-tier", "").strip(),
215
219
  )
216
220
  )
217
221
  return skills
@@ -53,6 +53,7 @@ class EmailTriggeredSkill:
53
53
  model: str
54
54
  agent: str = ""
55
55
  effort: str = ""
56
+ context_tier: str = ""
56
57
 
57
58
 
58
59
  def trigger_email_skills(
@@ -107,7 +108,8 @@ def trigger_email_skills(
107
108
  prompt = render_email_prompt(skill.body, message)
108
109
  try:
109
110
  response = run_claude(prompt, session_id, skill.model, skill.agent,
110
- effort=skill.effort)
111
+ effort=skill.effort,
112
+ context_tier=skill.context_tier)
111
113
  print(
112
114
  f"[email_skills] Claude response for {skill.name} ({len(response)} chars)")
113
115
  item.consume()
@@ -239,6 +241,7 @@ def find_email_triggered_skills(skills_dir: Path = SKILLS_DIR) -> dict[str, Emai
239
241
  model=metadata.get("model", "").strip(),
240
242
  agent=metadata.get("x-codee-agent", "").strip(),
241
243
  effort=metadata.get("effort", "").strip(),
244
+ context_tier=metadata.get("x-codee-context-tier", "").strip(),
242
245
  )
243
246
  return skills_by_address
244
247
 
@@ -33,6 +33,8 @@ class IssueTriggeredSkill:
33
33
  model: str = ""
34
34
  # The reasoning effort (``effort``), empty for the model's default.
35
35
  effort: str = ""
36
+ # The context window (``x-codee-context-tier``), empty for the default one.
37
+ context_tier: str = ""
36
38
  # The agent this skill asks to be run by (``x-codee-agent``), empty when it
37
39
  # names none and the default agent from Settings should drive it.
38
40
  agent: str = ""
@@ -97,6 +99,7 @@ def find_issue_triggered_skills(
97
99
  issue_type=issue_type,
98
100
  model=str(metadata.get("model", "")).strip(),
99
101
  effort=str(metadata.get("effort", "") or "").strip(),
102
+ context_tier=str(metadata.get("x-codee-context-tier", "") or "").strip(),
100
103
  agent=str(metadata.get("x-codee-agent", "") or "").strip(),
101
104
  argument_name=_argument_name(metadata.get("argument-hint")),
102
105
  ))
codee/test_admin.py CHANGED
@@ -230,15 +230,20 @@ CATALOG = [
230
230
  ModelOption(id="claude-opus-4-6", name="Claude Opus 4.6",
231
231
  efforts=["low", "medium", "high", "max"]),
232
232
  ModelOption(id="claude-haiku-4-5", name="Claude Haiku 4.5"),
233
+ ModelOption(id="claude-sonnet-5.5", name="Claude Sonnet 5.5",
234
+ efforts=["low", "medium", "high"], default_effort="medium",
235
+ context_tiers=[["default", "200K"], ["long_context", "1M"]]),
233
236
  ModelOption(id="auto", name="Auto",
234
237
  efforts=["efficiency", "balance", "intelligence"],
235
238
  default_effort="balance", effort_label="Tier"),
236
239
  ]
237
240
 
238
241
 
239
- def _editor(model: str = "", effort: str = "") -> SimpleNamespace:
242
+ def _editor(model: str = "", effort: str = "",
243
+ context_tier: str = "") -> SimpleNamespace:
240
244
  return SimpleNamespace(agent_models=CATALOG, skill_model=model,
241
- skill_effort=effort, model_query="")
245
+ skill_effort=effort, skill_context_tier=context_tier,
246
+ model_query="")
242
247
 
243
248
 
244
249
  def _var(name: str, state: SimpleNamespace):
@@ -333,11 +338,45 @@ def test_choosing_model_default_effort_clears_it() -> None:
333
338
  assert state.skill_effort == "low"
334
339
 
335
340
 
341
+ def test_the_context_picker_offers_the_models_windows() -> None:
342
+ state = _editor("claude-sonnet-5.5")
343
+
344
+ assert _var("skill_context_choices", state) == [
345
+ ["default", "200K"], ["long_context", "1M"]]
346
+ assert _var("skill_context_value", state) == "default"
347
+ assert _var("skill_context_value",
348
+ _editor("claude-sonnet-5.5", context_tier="long_context")
349
+ ) == "long_context"
350
+
351
+
352
+ def test_a_model_without_a_choice_of_window_hides_the_context_picker() -> None:
353
+ assert _var("skill_context_choices", _editor("claude-opus-5-5")) == []
354
+ assert _var("skill_context_choices", _editor("")) == []
355
+
356
+
357
+ def test_picking_the_default_window_stores_nothing() -> None:
358
+ state = _editor("claude-sonnet-5.5")
359
+
360
+ AdminState.set_skill_context_tier.fn(state, "long_context")
361
+ assert state.skill_context_tier == "long_context"
362
+ AdminState.set_skill_context_tier.fn(state, "default")
363
+ assert state.skill_context_tier == ""
364
+
365
+
366
+ def test_picking_a_model_without_long_context_clears_it() -> None:
367
+ state = _editor("claude-sonnet-5.5", context_tier="long_context")
368
+
369
+ AdminState.choose_model.fn(state, "claude-opus-5-5")
370
+
371
+ assert state.skill_context_tier == ""
372
+
373
+
336
374
  def test_switching_agent_resets_model_and_effort() -> None:
337
375
  state = SimpleNamespace(skill_agent="", skill_model="claude-opus-5-5",
338
- skill_effort="high", model_query="")
376
+ skill_effort="high",
377
+ skill_context_tier="long_context", model_query="")
339
378
 
340
379
  AdminState.set_skill_agent.fn(state, "Codex")
341
380
 
342
- assert (state.skill_agent, state.skill_model, state.skill_effort) == (
343
- "codex", "", "")
381
+ assert (state.skill_agent, state.skill_model, state.skill_effort,
382
+ state.skill_context_tier) == ("codex", "", "", "")
@@ -2522,6 +2522,32 @@ class AdminServiceSkillModelTest(unittest.TestCase):
2522
2522
  frontmatter, _ = parse_skill(write.call_args.args[1])
2523
2523
  self.assertEqual(frontmatter["effort"], "xhigh")
2524
2524
 
2525
+ def test_save_writes_a_long_context_tier_and_drops_the_default(
2526
+ self) -> None:
2527
+ with tempfile.TemporaryDirectory() as temporary_directory:
2528
+ skills_dir = Path(temporary_directory)
2529
+ service = self._service(
2530
+ skills_dir, "name: nightly\nx-codee-context-tier: long_context\n")
2531
+ self.assertEqual(service.load_skill("nightly")["context_tier"],
2532
+ "long_context")
2533
+ self.assertEqual(service.load_skill("nightly")["extra"], "")
2534
+
2535
+ written = {}
2536
+ for tier in ("long_context", "default", ""):
2537
+ with patch.object(service, "_write_and_push",
2538
+ return_value=(True, True, "saved")) as write:
2539
+ service.save_skill({
2540
+ "slug": "nightly", "name": "nightly",
2541
+ "description": "", "type": "knowledge",
2542
+ "model": "claude-opus-5.5", "context_tier": tier,
2543
+ "body": "Body",
2544
+ })
2545
+ frontmatter, _ = parse_skill(write.call_args.args[1])
2546
+ written[tier] = frontmatter.get("x-codee-context-tier")
2547
+
2548
+ self.assertEqual(written, {"long_context": "long_context",
2549
+ "default": None, "": None})
2550
+
2525
2551
  def test_an_empty_effort_is_left_out_of_the_frontmatter(self) -> None:
2526
2552
  with tempfile.TemporaryDirectory() as temporary_directory:
2527
2553
  skills_dir = Path(temporary_directory)
@@ -2743,7 +2769,7 @@ class AdminServiceAgentModelsTest(unittest.TestCase):
2743
2769
  self.assertEqual(
2744
2770
  first, [{"id": "claude-opus-5", "name": "Claude Opus 5",
2745
2771
  "efforts": ["low", "high"], "default_effort": "high",
2746
- "effort_label": ""}])
2772
+ "effort_label": "", "context_tiers": []}])
2747
2773
  self.assertEqual(second, first)
2748
2774
  list_models.assert_called_once()
2749
2775
 
@@ -2758,7 +2784,7 @@ class AdminServiceAgentModelsTest(unittest.TestCase):
2758
2784
  self.assertEqual(
2759
2785
  models, [{"id": "gpt-6-astra", "name": "GPT-6 Astra",
2760
2786
  "efforts": [], "default_effort": "",
2761
- "effort_label": ""}])
2787
+ "effort_label": "", "context_tiers": []}])
2762
2788
  claude_models.assert_not_called()
2763
2789
 
2764
2790
  def test_an_agent_codee_cannot_run_falls_back_to_the_default(self) -> None:
@@ -2769,7 +2795,7 @@ class AdminServiceAgentModelsTest(unittest.TestCase):
2769
2795
  self.assertEqual(service.list_agent_models("cursor"),
2770
2796
  [{"id": "claude-opus-5", "name": "Claude Opus 5",
2771
2797
  "efforts": [], "default_effort": "",
2772
- "effort_label": ""}])
2798
+ "effort_label": "", "context_tiers": []}])
2773
2799
 
2774
2800
  def test_every_agent_codee_can_run_is_offered(self) -> None:
2775
2801
  service = self._service(CodingAgent.CLAUDE_CODE)
@@ -2799,7 +2825,7 @@ class AdminServiceAgentModelsTest(unittest.TestCase):
2799
2825
  self.assertEqual(service.list_agent_models(),
2800
2826
  [{"id": "gpt-6", "name": "GPT-6",
2801
2827
  "efforts": [], "default_effort": "",
2802
- "effort_label": ""}])
2828
+ "effort_label": "", "context_tiers": []}])
2803
2829
 
2804
2830
 
2805
2831
  class AdminServiceAgentsFileTest(unittest.TestCase):
codee/test_executor.py CHANGED
@@ -293,13 +293,14 @@ class RunAgentSelectionTest(unittest.TestCase):
293
293
  with patch.object(executor, "_agent_for_skill",
294
294
  return_value=agent) as chosen:
295
295
  reply = executor._run_agent("/nightly", "sid-1", "gpt-6-astra",
296
- "codex", effort="xhigh")
296
+ "codex", effort="xhigh",
297
+ context_tier="long_context")
297
298
 
298
299
  self.assertEqual(reply, "done")
299
300
  chosen.assert_called_once_with("codex")
300
301
  self.assertEqual(agent.run.call_args.args[:3],
301
302
  ("/nightly", "sid-1", "gpt-6-astra"))
302
- self.assertEqual(agent.run.call_args.args[4], "xhigh")
303
+ self.assertEqual(agent.run.call_args.args[4:], ("xhigh", "long_context"))
303
304
 
304
305
  def test_an_issue_skills_effort_reaches_its_worker(self) -> None:
305
306
  with patch.object(executor, "_max_parallel_agents", return_value=1), \
@@ -307,11 +308,12 @@ class RunAgentSelectionTest(unittest.TestCase):
307
308
  patch.object(executor.threading, "Thread") as thread:
308
309
  launched = executor._submit_task(
309
310
  "NIM-9", "/skill NIM-9", "sid-9", "skill", "claude-opus-5",
310
- "", "/skill NIM-9", "max")
311
+ "", "/skill NIM-9", "max", "long_context")
311
312
  executor._inflight.discard("NIM-9")
312
313
 
313
314
  self.assertTrue(launched)
314
- self.assertEqual(thread.call_args.kwargs["args"][-1], "max")
315
+ self.assertEqual(thread.call_args.kwargs["args"][-2:],
316
+ ("max", "long_context"))
315
317
 
316
318
 
317
319
  class RunTaskLoggingTest(unittest.TestCase):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codee-agent
3
- Version: 0.9.1
3
+ Version: 0.9.2
4
4
  Summary: A virtual co-worker that picks up Jira and Azure DevOps tasks and solves them with coding agents.
5
5
  Keywords: ai,agent,jira,azure-devops,claude-code,github-copilot,codex,opencode,automation
6
6
  Author: Denis Kibalko
@@ -1,12 +1,12 @@
1
1
  codee/.gitignore,sha256=Fltsn5J90L9HwYTVg7Xlaoek3U0riZWmDTWmf0Ttfr8,15
2
2
  codee/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- codee/admin.py,sha256=NyBNHADkroXC_zYfKa8ytSmhrf0GyW_wc9ZDqoIHnmg,196075
3
+ codee/admin.py,sha256=nZN7nJVu0gE2w6D8j3zdjLtgKwvvQGiKV4EL3h4sa3g,199359
4
4
  codee/admin_api.py,sha256=q2S2H6neSXkcjrlhI3s190jJbOgenL0sqle5vnYmM5E,2503
5
5
  codee/admin_cli.py,sha256=8Hj9okvF1KMRsfm8IhGwl_E6OLqVAQ-wB2fjDKB9M4w,2871
6
- codee/admin_service.py,sha256=MEswu7wV0PIk0RHdUFTVd0wMXsnqlke4g84aMTJ3wz8,124567
6
+ codee/admin_service.py,sha256=tGnlidpKmbQTuZiipwrqcIGlhxiseWKpurH9CqvMKhM,125171
7
7
  codee/agent_cli.py,sha256=BNCMT4bIoAVmgbbU5QxAyktPmUXXWbB_I9cjg1vdBLg,2553
8
8
  codee/coding_agents.py,sha256=w7ofwl8b7CaPJzwBttxNpZyHUbm94P1XroKrRN5y2f8,3438
9
- codee/executor.py,sha256=szSW2a-RuKtnKE-3ZwCf58E8jrYT_m74rBiHFW5svzo,24936
9
+ codee/executor.py,sha256=FWUi_uMHqkt5552gAnxm5yN8mADYzzOdhvJEUUnpqiE,25222
10
10
  codee/init_cli.py,sha256=GfoHtX31V1HgKFtKZHVWLrjQI1smG3Xf3PoE-SSl1HE,6537
11
11
  codee/lib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  codee/lib/claude_key_rotation.py,sha256=p9cOMrxQjDxKXntN68b11b8yoHqmsGu8YCZ8aFQ0jtU,18920
@@ -17,13 +17,13 @@ codee/lib/runtime_control.py,sha256=Dm4ntKrUCW9nvaUk7lRSCtmHPQwWtlEnPMe7QoEdpgU,
17
17
  codee/lib/test_claude_key_rotation.py,sha256=PbJ_9XQSPj3vvKzkax_hASJBnd_L_gM2pOhoowdE-OU,27519
18
18
  codee/lib/test_mcp_config.py,sha256=iS1wHpCQqy-ZwDSzWWv7RV5MqVghkaLWno-KOFVZ9XQ,7330
19
19
  codee/lib/test_runs_db.py,sha256=oEG2dJfLxOWK4aeYxc5vmNrRx8AjGvf6pNZ_1531FK8,16047
20
- codee/lib/test_trigger_cron_skills.py,sha256=KG4S3laKlPPZVJXr96ZN3XjjmLvCI79KDS4QFexvoTw,24459
21
- codee/lib/test_trigger_email_skills.py,sha256=3Vq4IkTfxThbH0gTa7-Mu9qUUEFve-_OrFxAeuH_gmc,5441
20
+ codee/lib/test_trigger_cron_skills.py,sha256=yfFCbe0-Brq1nRJRovQh_Wh0dtH346DSnBwn1dF-o5E,25236
21
+ codee/lib/test_trigger_email_skills.py,sha256=uLD1o7OpgPfEsVH40Yi8piPyJOpAXOqLnlMrzAq1_Vc,5477
22
22
  codee/lib/test_trigger_issue_skills.py,sha256=pzwdkuGE1bmGGWnyP_-C5ouI38p2woroV-QzqTHlfgE,7665
23
- codee/lib/trigger_aws_sqs_skills.py,sha256=Poip8tkZdNlbajVUs0zBqlQ3XFMDTBn_ukxUy2G9CvE,9052
24
- codee/lib/trigger_cron_skills.py,sha256=HV2nfRMZpZ5yLx9Uc04uO423_l_xh_DGVK0TRUEViDE,13662
25
- codee/lib/trigger_email_skills.py,sha256=jQksC6QMlQib6Nh7IQuexfRyR_u9j7wqfPUrh2R7DAw,11960
26
- codee/lib/trigger_issue_skills.py,sha256=Px1XZkOsjvYu2JE2PljCsJS9mSDE1FXiE9H4xsGyILU,5788
23
+ codee/lib/trigger_aws_sqs_skills.py,sha256=oiaIKPnlLyPI0GteRrP1nGvzy7q-jv81GbEV9C1II2U,9225
24
+ codee/lib/trigger_cron_skills.py,sha256=OK61d-q7DnEGMywXq-YnF33iKqApTatUfR7FUS7LvY4,13895
25
+ codee/lib/trigger_email_skills.py,sha256=fCWCmYjLZidiwKK5zx1qz1v6sIVn2ayUMMWtZTyyHy4,12129
26
+ codee/lib/trigger_issue_skills.py,sha256=qWlw91LXllMNaEWuCh0SbVv7lWpLCgw2WnpI0AyV-1c,5981
27
27
  codee/mail_server.py,sha256=vqlObtIo59zjsTknWTdFhXJMOOG5bBbc5JMm4TDX1IU,1691
28
28
  codee/setup_wizard.py,sha256=t23LuvWfXFPOwLoRhF1igfJ565-2hJ-RW7_9bf5Nh_4,18075
29
29
  codee/start_cli.py,sha256=-YHCM3VHb1leZhH9lYOiJnMshGOJOlq7sTxfOrtzTB0,2940
@@ -42,13 +42,13 @@ codee/templates/skills/task-code-reviewer/SKILL.md,sha256=spT7kL_X6WsJtvUt6_2Ga3
42
42
  codee/templates/skills/task-developer/SKILL.md,sha256=65YFC9kF7UY5AZXAP4O5nYFksTVdfcq-a6LNeRO4414,1956
43
43
  codee/templates/skills/task-qa/SKILL.md,sha256=sPyMDbicCfYdf4QF8E5vLjUuPrZNyKl0F9xxHNMptW4,1746
44
44
  codee/templates/skills/task-security-reviewer/SKILL.md,sha256=DY__ZKPGUeqveMZ0M3P4eGLaRkn3zykFlWW6tlf3VIY,1842
45
- codee/test_admin.py,sha256=FvVe_8jzptQw6gtRZK3N-DVKadgXoaDegh2mqyRixo0,13297
45
+ codee/test_admin.py,sha256=7rujTILPoFh051gtDGx_99eoLGDV4MZq8-081YJClGE,14914
46
46
  codee/test_admin_api.py,sha256=eT-ZCWw8giVU5V1xdqdctytVjuXV3wm3FKv4Nnp3gaU,2710
47
47
  codee/test_admin_cli.py,sha256=xMAdp8nBneNp6krZQo3SLtGM9rpjo19mnmmKqtM0QDw,3775
48
- codee/test_admin_service.py,sha256=Qamz9tF2UsWbN9maHKx0AmDnlal6tDc8-MLphnzwoVc,176788
48
+ codee/test_admin_service.py,sha256=Pe6OlXfDl5mSS-NCojpsAxE2o5gpy_X_0Pnqx02xpnc,178210
49
49
  codee/test_agent_cli.py,sha256=JMRuG1lt5EgGr-YbvXEG8MSQdlQZwF4Yda8ZDLZVJTo,4363
50
50
  codee/test_coding_agents.py,sha256=8YPcEqVcyrvcQq6gpX3DmdHoP7z7fJ9kHl59Hre9Ruk,2700
51
- codee/test_executor.py,sha256=bHIIV5DEtnQl_P5DFXz5Jn9JYxqY_Xmf96UQtP7Drcs,28016
51
+ codee/test_executor.py,sha256=z8c71dhOcsjp9ILn79d7Tf0e3YC5TQMYYevOGU1AmpQ,28164
52
52
  codee/test_init_cli.py,sha256=QFVS0_-VQzyVp54p0yM4CFJqHwMH2S2m7ed30bm-9Uk,7797
53
53
  codee/test_memory_index.py,sha256=8Q2wq2l-L53QBDqzAeGaTQAaK4aCI4zo7WZND7byUZw,841
54
54
  codee/test_setup_wizard.py,sha256=cqM1y0nGVvW_YYp8oPm30johG3QOPWQIMT78ekLcn8E,11479
@@ -58,24 +58,24 @@ codee_admin/__init__.py,sha256=kdPfIMlHX4kajFVw6XmC2jqsw1XKkkfEGWWC_3bdDZE,51
58
58
  codee_admin/codee_admin.py,sha256=MVzRzfRsMYWkcaD3zQG8bDmvs5FTrUSFz1Ij-_wU8e4,93
59
59
  codee_agent_abstract/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
60
60
  codee_agent_abstract/acp.py,sha256=93FBrYQNcFF2ihij_ef3FgZlSKd5-gL6oiDjRNdHkfw,7714
61
- codee_agent_abstract/provider.py,sha256=SaJ7lHJhwEGOWWoCm7S-oOcgFLeke6pk1WXNTtJSOMQ,8266
61
+ codee_agent_abstract/provider.py,sha256=sDq8sd8_fLyKZ6f4fveJWgiQdCCSIFf-rNwurT29JKU,8838
62
62
  codee_agent_abstract/test.py,sha256=cB5D1xhAYzIT-xGoov9l2KGn-Rq8QCKLpZeDfzNsVGI,9998
63
63
  codee_agent_abstract/transcript.py,sha256=E6l5xFrC067xXuATkWs5JvOZuefOt93err2HgxpJk8M,2791
64
64
  codee_agent_claude_code/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
65
65
  codee_agent_claude_code/account.py,sha256=Gv_9vGtMFROi9p2iNUqKKWmDoA3HZE_7n6wHVie9XJM,3068
66
66
  codee_agent_claude_code/credentials.py,sha256=sT9GasA5SjZIoNmlZlo1hRECYDFn6O3Tge7Tuw8D9J8,5320
67
67
  codee_agent_claude_code/oauth.py,sha256=kSr5cLuVcHUvny563DSXpwCV0tw8zySMsfqtdqDrGnI,10357
68
- codee_agent_claude_code/provider.py,sha256=sMDeqEFMHS7ZVTtAmDX3Bc1q149CJLGX54XtnTKpucg,8516
68
+ codee_agent_claude_code/provider.py,sha256=taC-rAEbBRN-4_UBJ_oQ9pgDPSslaOUjgwkYtwD_SgE,8572
69
69
  codee_agent_claude_code/test.py,sha256=ajmOLL4hunaz06cCUxSXKxVRrrEW4O5iB94uEXXzaCg,27432
70
70
  codee_agent_claude_code/usage.py,sha256=wSvJNDwAJmmQT7Syc-TF-DeW3yc8c2iJvZbbRwbJsqU,6202
71
71
  codee_agent_codex/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
72
- codee_agent_codex/provider.py,sha256=4_y0IKbaHd18XQM_tcRbRDG0XCJB8BxonOFFZLqUxHo,20611
72
+ codee_agent_codex/provider.py,sha256=doJtc8tIScNnJQuJfepQT7ncxjRLkK02jYFA3FYCYQY,20667
73
73
  codee_agent_codex/test.py,sha256=eyBLlCfahbnQnxhGqo86SqodS61IDns9CRADi0ji73I,15875
74
74
  codee_agent_github_copilot/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
75
- codee_agent_github_copilot/provider.py,sha256=-kFz7vR-PqSQZBzHGbjtiBnR5dEubAP2J9puoTv_omA,12533
76
- codee_agent_github_copilot/test.py,sha256=yGmG3PS0PRv_wqA8Lzv8NMdtbPOBPobx9xbEVtX-C4o,17358
75
+ codee_agent_github_copilot/provider.py,sha256=wVx_aDdrpiUyGA07hg_kS7-eLSy6MJYbpwK5FZ_RE2E,17846
76
+ codee_agent_github_copilot/test.py,sha256=zNq-Geg4j5BrH6vKGCn5ZTYfmssxDgQ3aXlziQPFF5w,20698
77
77
  codee_agent_opencode/__init__.py,sha256=7RLeh9HIa5kXdpzvXSwI2UjNczzsTwOmcanVjv2ZkhY,41
78
- codee_agent_opencode/provider.py,sha256=nf-12B2OJ03AlN1Obm4oQXc2ZrY_zeV_Mjy1DRKkDxU,9269
78
+ codee_agent_opencode/provider.py,sha256=xBg-B9xl8_iQ8DuONk-a4hAoe10aIEuWyTn2jXWkm2M,9325
79
79
  codee_agent_opencode/test.py,sha256=s670NxVJVeXH5hS-S8SiQrcFm_nH-zD2esFTDKsp9SQ,8315
80
80
  codee_database/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
81
81
  codee_database/claude_code_accounts.py,sha256=aaB4HKiwkcp1nPZ6JQS4Ja0YwsfE-yeIIr73wHI8Sps,11290
@@ -95,8 +95,8 @@ codee_tasks_azure_devops/test.py,sha256=i9xDAM0sNw6Cr1s3BprECDnua4WQHkD1anD7kK_l
95
95
  codee_tasks_jira/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
96
96
  codee_tasks_jira/provider.py,sha256=N0llXpNzA4O6jD72hx_3_iksloFykar7wscZDcGfdb4,19053
97
97
  codee_tasks_jira/test.py,sha256=R0jOw8k_8uF6mYhANpGWZxQI8Dkya0M2Bk0oEK64iGo,27070
98
- codee_agent-0.9.1.dist-info/licenses/LICENSE,sha256=kXz80_Kc5IXrxIiweSCMx9Dv_AUeOcfwnQqCk2IDTmY,1075
99
- codee_agent-0.9.1.dist-info/WHEEL,sha256=a0ta4TK7UKMB0EbDesmi2mn0Djkly7aj_7Tu2R7SseE,81
100
- codee_agent-0.9.1.dist-info/entry_points.txt,sha256=Hr_8ZaN6g5DO1S94WbFpIwJzGAIeyhJrWIXl9BA0uIM,194
101
- codee_agent-0.9.1.dist-info/METADATA,sha256=IbQCN-ebrhIzuDpNHCZGXy0P0Yh4ovindP4xgnoDKpY,2997
102
- codee_agent-0.9.1.dist-info/RECORD,,
98
+ codee_agent-0.9.2.dist-info/licenses/LICENSE,sha256=kXz80_Kc5IXrxIiweSCMx9Dv_AUeOcfwnQqCk2IDTmY,1075
99
+ codee_agent-0.9.2.dist-info/WHEEL,sha256=a0ta4TK7UKMB0EbDesmi2mn0Djkly7aj_7Tu2R7SseE,81
100
+ codee_agent-0.9.2.dist-info/entry_points.txt,sha256=Hr_8ZaN6g5DO1S94WbFpIwJzGAIeyhJrWIXl9BA0uIM,194
101
+ codee_agent-0.9.2.dist-info/METADATA,sha256=K4RYfPUtX4BilUbEUy_MRojFjHJGC21Qg2NXh9FQ_ug,2997
102
+ codee_agent-0.9.2.dist-info/RECORD,,
@@ -39,6 +39,10 @@ class AgentModel:
39
39
  reasoning effort, and names them for the picker (Copilot's Auto offers
40
40
  routing tiers). Such a setting always has a value, so the picker has no
41
41
  "model default" entry and shows ``default_effort`` until one is chosen.
42
+
43
+ ``context_tiers`` are the context windows the model can run with, as
44
+ ``(value, label)`` pairs such as ``("long_context", "1M")``, the first one
45
+ being the default. Empty when the agent offers no choice of window.
42
46
  """
43
47
 
44
48
  id: str
@@ -46,6 +50,7 @@ class AgentModel:
46
50
  efforts: tuple[str, ...] = ()
47
51
  default_effort: str = ""
48
52
  effort_label: str = ""
53
+ context_tiers: tuple[tuple[str, str], ...] = ()
49
54
 
50
55
 
51
56
  @dataclass(frozen=True)
@@ -107,13 +112,16 @@ class AbstractCodingAgent(ABC):
107
112
  @abstractmethod
108
113
  def run(self, user_message: str, session_id: str, model: str = "",
109
114
  on_session_id: Callable[[str], None] | None = None,
110
- effort: str = "") -> str:
115
+ effort: str = "", context_tier: str = "") -> str:
111
116
  """Run the agent with the message in ``session_id`` and return its text.
112
117
 
113
118
  ``model`` is the skill's ``model:`` frontmatter, or empty for the agent's
114
119
  default. Agents that read the frontmatter themselves may ignore it.
115
120
  ``effort`` is the skill's ``effort:`` frontmatter, a level from the
116
121
  model's ``AgentModel.efforts``, or empty for the model's default.
122
+ ``context_tier`` is its ``x-codee-context-tier:``, a value from the
123
+ model's ``AgentModel.context_tiers``, or empty for the default window;
124
+ agents that offer no tiers ignore it.
117
125
 
118
126
  ``on_session_id`` is called with the session the agent actually ran
119
127
  under, as early as that is known. Most agents are handed one and run
@@ -134,6 +142,7 @@ class AbstractCodingAgent(ABC):
134
142
  model: str = "",
135
143
  on_session_id: Callable[[str], None] | None = None,
136
144
  effort: str = "",
145
+ context_tier: str = "",
137
146
  ) -> str:
138
147
  """Continue an existing agent conversation and return its final reply.
139
148
 
@@ -141,7 +150,8 @@ class AbstractCodingAgent(ABC):
141
150
  need no special implementation. Agents with a distinct resume command
142
151
  override this method.
143
152
  """
144
- return self.run(user_message, session_id, model, on_session_id, effort)
153
+ return self.run(user_message, session_id, model, on_session_id, effort,
154
+ context_tier)
145
155
 
146
156
  def skill_prompt(self, slug: str, path: Path, argument: str = "",
147
157
  argument_name: str = "") -> str:
@@ -77,7 +77,7 @@ class ClaudeCodeAgent(AbstractCodingAgent):
77
77
 
78
78
  def run(self, user_message: str, session_id: str, model: str = "",
79
79
  on_session_id: Callable[[str], None] | None = None,
80
- effort: str = "") -> str:
80
+ effort: str = "", context_tier: str = "") -> str:
81
81
  # The session is ours to name and the CLI is told to use it, so the
82
82
  # answer is known before the run starts.
83
83
  if on_session_id:
@@ -91,6 +91,7 @@ class ClaudeCodeAgent(AbstractCodingAgent):
91
91
  model: str = "",
92
92
  on_session_id: Callable[[str], None] | None = None,
93
93
  effort: str = "",
94
+ context_tier: str = "",
94
95
  ) -> str:
95
96
  if on_session_id:
96
97
  on_session_id(session_id)
@@ -82,7 +82,7 @@ class CodexAgent(AbstractCodingAgent):
82
82
 
83
83
  def run(self, user_message: str, session_id: str, model: str = "",
84
84
  on_session_id: Callable[[str], None] | None = None,
85
- effort: str = "") -> str:
85
+ effort: str = "", context_tier: str = "") -> str:
86
86
  # ``session_id`` is not passed on: Codex mints its own thread id and has
87
87
  # no flag to be handed one. It announces that id on its first line of
88
88
  # output, which is what ``on_session_id`` carries back — reported while
@@ -124,6 +124,7 @@ class CodexAgent(AbstractCodingAgent):
124
124
  model: str = "",
125
125
  on_session_id: Callable[[str], None] | None = None,
126
126
  effort: str = "",
127
+ context_tier: str = "",
127
128
  ) -> str:
128
129
  result = self._exec(user_message, model, effort, on_session_id,
129
130
  session_id)
@@ -1,7 +1,10 @@
1
1
  import json
2
2
  import os
3
+ import queue
3
4
  import re
4
5
  import subprocess
6
+ import threading
7
+ import time
5
8
  from collections.abc import Callable
6
9
  from pathlib import Path
7
10
 
@@ -40,6 +43,13 @@ AUTO_MODEL = "auto"
40
43
  AUTO_TIERS = ("efficiency", "balance", "intelligence")
41
44
  DEFAULT_AUTO_TIER = "balance"
42
45
 
46
+ # Which models take a long context window, and how long each window is, is only
47
+ # in the catalog the SDK's headless server answers `models.list` with: a model
48
+ # that offers it carries `billing.tokenPrices.longContext`. ACP doesn't say.
49
+ HEADLESS_COMMAND = ["copilot", "--headless", "--stdio", "--no-auto-update"]
50
+ DEFAULT_CONTEXT = "default"
51
+ LONG_CONTEXT = "long_context"
52
+
43
53
  # Ceiling on what one run may spend. AI credits bill at $0.04 each, so the
44
54
  # default is the same $20 cap the Claude Code agent puts on a run.
45
55
  MAX_AI_CREDITS_ENV_VAR = "CODEE_COPILOT_MAX_AI_CREDITS"
@@ -111,10 +121,20 @@ class GitHubCopilotAgent(AbstractCodingAgent):
111
121
  # or isn't logged in must not break the admin UI.
112
122
  log.warning("Could not read the copilot model catalog: %s", exc)
113
123
  return []
124
+ try:
125
+ windows = _context_tiers(_headless_models())
126
+ except Exception as exc:
127
+ # Without it the models are still worth offering, just with no
128
+ # choice of context window.
129
+ log.warning("Could not read copilot's context windows: %s", exc)
130
+ windows = {}
114
131
  # ACP reports no options for Auto; its tiers come from `--auto-tier`.
115
132
  return [AgentModel(model.id, model.name, AUTO_TIERS, DEFAULT_AUTO_TIER,
116
133
  "Tier")
117
- if model.id == AUTO_MODEL else model
134
+ if model.id == AUTO_MODEL
135
+ else AgentModel(model.id, model.name, model.efforts,
136
+ model.default_effort,
137
+ context_tiers=windows.get(model.id, ()))
118
138
  for model in models]
119
139
 
120
140
  @classmethod
@@ -130,7 +150,7 @@ class GitHubCopilotAgent(AbstractCodingAgent):
130
150
 
131
151
  def run(self, user_message: str, session_id: str, model: str = "",
132
152
  on_session_id: Callable[[str], None] | None = None,
133
- effort: str = "") -> str:
153
+ effort: str = "", context_tier: str = "") -> str:
134
154
  # The session is ours to name and the CLI is told to use it, so the
135
155
  # answer is known before the run starts.
136
156
  if on_session_id:
@@ -160,6 +180,9 @@ class GitHubCopilotAgent(AbstractCodingAgent):
160
180
  cmd += ["--auto-tier", effort or DEFAULT_AUTO_TIER]
161
181
  elif effort:
162
182
  cmd += ["--reasoning-effort", effort]
183
+ # Also passed when unset, for the same reason as the tier: the CLI
184
+ # otherwise runs on the context tier its own config has stored.
185
+ cmd += ["--context", context_tier or DEFAULT_CONTEXT]
163
186
  debug_enabled = os.environ.get(
164
187
  COPILOT_DEBUG_ENV_VAR, "").strip().lower() == "true"
165
188
  if debug_enabled:
@@ -214,6 +237,106 @@ class GitHubCopilotAgent(AbstractCodingAgent):
214
237
  return AgentResponse(reply, stderr if debug_enabled else "")
215
238
 
216
239
 
240
+ def _headless_models() -> list[dict]:
241
+ """The model catalog Copilot's headless server answers ``models.list`` with.
242
+
243
+ The server speaks JSON-RPC framed with ``Content-Length`` headers, and quits
244
+ as soon as its stdin closes, before answering, so it is kept open until the
245
+ reply arrives or ``acp.TIMEOUT_SECONDS`` pass.
246
+ """
247
+ process = subprocess.Popen(
248
+ HEADLESS_COMMAND, stdin=subprocess.PIPE, stdout=subprocess.PIPE,
249
+ stderr=subprocess.DEVNULL)
250
+ try:
251
+ replies: queue.Queue[dict] = queue.Queue()
252
+ threading.Thread(target=_read_framed, args=(process.stdout, replies),
253
+ daemon=True).start()
254
+ body = json.dumps({"jsonrpc": "2.0", "id": 1,
255
+ "method": "models.list", "params": {}}).encode()
256
+ process.stdin.write(b"Content-Length: %d\r\n\r\n" % len(body) + body)
257
+ process.stdin.flush()
258
+ deadline = time.monotonic() + acp.TIMEOUT_SECONDS
259
+ while True:
260
+ remaining = deadline - time.monotonic()
261
+ if remaining <= 0:
262
+ raise RuntimeError("copilot --headless did not answer models.list")
263
+ try:
264
+ reply = replies.get(timeout=min(remaining, 0.5))
265
+ except queue.Empty:
266
+ if process.poll() is not None:
267
+ raise RuntimeError(
268
+ f"copilot --headless exited {process.returncode}")
269
+ continue
270
+ if reply.get("id") != 1:
271
+ continue
272
+ if "error" in reply:
273
+ raise RuntimeError(f"models.list errored: {reply['error']}")
274
+ result = reply.get("result")
275
+ models = result.get("models") if isinstance(result, dict) else result
276
+ return [model for model in models or [] if isinstance(model, dict)]
277
+ finally:
278
+ process.kill()
279
+
280
+
281
+ def _read_framed(stream, replies: "queue.Queue[dict]") -> None:
282
+ """Pump ``Content-Length`` framed JSON messages from ``stream`` into a queue."""
283
+ while True:
284
+ length = None
285
+ while True:
286
+ line = stream.readline()
287
+ if not line:
288
+ return
289
+ line = line.strip()
290
+ if not line:
291
+ break
292
+ name, _, value = line.decode("ascii", "replace").partition(":")
293
+ if name.strip().lower() == "content-length":
294
+ length = int(value.strip())
295
+ if length is None:
296
+ continue
297
+ try:
298
+ message = json.loads(stream.read(length))
299
+ except json.JSONDecodeError:
300
+ continue
301
+ if isinstance(message, dict):
302
+ replies.put(message)
303
+
304
+
305
+ def _context_tiers(models: list[dict]) -> dict[str, tuple[tuple[str, str], ...]]:
306
+ """The context windows of each model that offers a long one, by model id.
307
+
308
+ The default window is labelled by its prompt budget and the long one by the
309
+ model's whole window, which is how Copilot itself sizes them ("200K" and
310
+ "1M" for Claude Sonnet 5.5).
311
+ """
312
+ tiers = {}
313
+ for model in models:
314
+ prices = (model.get("billing") or {}).get("tokenPrices") or {}
315
+ long_context = prices.get("longContext")
316
+ if not isinstance(long_context, dict):
317
+ continue
318
+ limits = (model.get("capabilities") or {}).get("limits") or {}
319
+ default_size = prices.get("maxPromptTokens") or prices.get("contextMax")
320
+ long_size = (limits.get("max_context_window_tokens")
321
+ or long_context.get("maxPromptTokens")
322
+ or long_context.get("contextMax"))
323
+ tiers[str(model.get("id", ""))] = (
324
+ (DEFAULT_CONTEXT, _tokens(default_size) or "Default"),
325
+ (LONG_CONTEXT, _tokens(long_size) or "Long"))
326
+ return tiers
327
+
328
+
329
+ def _tokens(count) -> str:
330
+ """``count`` tokens the way a context window is usually named: 200K, 1M."""
331
+ if not isinstance(count, (int, float)) or count <= 0:
332
+ return ""
333
+ if count >= 1_000_000:
334
+ # Truncated, so a 1,050,000 window still reads as the 1M it is sold as.
335
+ tenths = int(count // 100_000) / 10
336
+ return f"{tenths:g}M"
337
+ return f"{round(count / 1000)}K"
338
+
339
+
217
340
  def _events_file(session_id: str) -> Path | None:
218
341
  """The events log Copilot is writing ``session_id`` to, or None before it starts.
219
342
 
@@ -8,7 +8,8 @@ from unittest.mock import patch
8
8
 
9
9
  from codee_agent_abstract.provider import AgentModel
10
10
  from codee_agent_github_copilot.provider import (
11
- COPILOT_DEBUG_ENV_VAR, MAX_AI_CREDITS_ENV_VAR, GitHubCopilotAgent)
11
+ COPILOT_DEBUG_ENV_VAR, MAX_AI_CREDITS_ENV_VAR, GitHubCopilotAgent,
12
+ _context_tiers)
12
13
  from codee_main_context.context import Settings
13
14
 
14
15
  SESSION = "82232f47-df60-4cb3-8c3a-de12074c9205"
@@ -80,11 +81,12 @@ class CopilotRunTest(unittest.TestCase):
80
81
  def setUp(self) -> None:
81
82
  self.agent = GitHubCopilotAgent(Settings(), Path("/repo"))
82
83
 
83
- def _run(self, completed, model: str = "", effort: str = "") -> str:
84
+ def _run(self, completed, model: str = "", effort: str = "",
85
+ context_tier: str = "") -> str:
84
86
  with patch("subprocess.run", return_value=completed) as run:
85
87
  self.captured = run
86
88
  return self.agent.run("/do-it CORE-1", SESSION, model,
87
- effort=effort)
89
+ effort=effort, context_tier=context_tier)
88
90
 
89
91
  def test_returns_the_last_assistant_message(self) -> None:
90
92
  stdout = _stream(
@@ -207,6 +209,25 @@ class CopilotRunTest(unittest.TestCase):
207
209
 
208
210
  self.assertNotIn("--auto-tier", self.captured.call_args.args[0])
209
211
 
212
+ def test_the_skill_context_tier_is_passed_on_the_command_line(self) -> None:
213
+ stdout = _stream(_event("assistant.message", {"content": "ok"}),
214
+ _event("result", exitCode=0))
215
+
216
+ self._run(_completed(stdout), "claude-opus-5.5",
217
+ context_tier="long_context")
218
+
219
+ cmd = self.captured.call_args.args[0]
220
+ self.assertEqual(cmd[cmd.index("--context") + 1], "long_context")
221
+
222
+ def test_no_context_tier_pins_the_default_window(self) -> None:
223
+ stdout = _stream(_event("assistant.message", {"content": "ok"}),
224
+ _event("result", exitCode=0))
225
+
226
+ self._run(_completed(stdout), "claude-opus-5.5")
227
+
228
+ cmd = self.captured.call_args.args[0]
229
+ self.assertEqual(cmd[cmd.index("--context") + 1], "default")
230
+
210
231
  def test_no_model_leaves_the_agent_on_its_default(self) -> None:
211
232
  stdout = _stream(_event("assistant.message", {"content": "ok"}),
212
233
  _event("result", exitCode=0))
@@ -321,7 +342,9 @@ class CopilotModelCatalogTest(unittest.TestCase):
321
342
  ("low", "high"), "high")]
322
343
 
323
344
  with patch("codee_agent_github_copilot.provider.acp.fetch_models",
324
- return_value=catalog) as fetch:
345
+ return_value=catalog) as fetch, \
346
+ patch("codee_agent_github_copilot.provider._headless_models",
347
+ return_value=[]):
325
348
  self.assertEqual(GitHubCopilotAgent.list_models(), catalog)
326
349
 
327
350
  fetch.assert_called_once_with(["copilot", "--acp"])
@@ -331,7 +354,9 @@ class CopilotModelCatalogTest(unittest.TestCase):
331
354
  AgentModel("claude-opus-5", "Claude Opus 5")]
332
355
 
333
356
  with patch("codee_agent_github_copilot.provider.acp.fetch_models",
334
- return_value=catalog):
357
+ return_value=catalog), \
358
+ patch("codee_agent_github_copilot.provider._headless_models",
359
+ return_value=[]):
335
360
  models = GitHubCopilotAgent.list_models()
336
361
 
337
362
  self.assertEqual(models[0], AgentModel(
@@ -339,6 +364,50 @@ class CopilotModelCatalogTest(unittest.TestCase):
339
364
  "balance", "Tier"))
340
365
  self.assertEqual(models[1], catalog[1])
341
366
 
367
+ def test_models_with_a_long_context_offer_both_windows(self) -> None:
368
+ catalog = [AgentModel("claude-opus-5.5", "Claude Opus 5.5",
369
+ ("low", "high"), "high"),
370
+ AgentModel("claude-haiku-4.5", "Claude Haiku 4.5")]
371
+ headless = [
372
+ {"id": "claude-opus-5.5",
373
+ "capabilities": {"limits": {"max_context_window_tokens": 1000000}},
374
+ "billing": {"tokenPrices": {"maxPromptTokens": 200000,
375
+ "longContext": {"inputPrice": 400}}}},
376
+ {"id": "claude-haiku-4.5",
377
+ "capabilities": {"limits": {"max_context_window_tokens": 200000}},
378
+ "billing": {"tokenPrices": {}}},
379
+ ]
380
+
381
+ with patch("codee_agent_github_copilot.provider.acp.fetch_models",
382
+ return_value=catalog), \
383
+ patch("codee_agent_github_copilot.provider._headless_models",
384
+ return_value=headless):
385
+ opus, haiku = GitHubCopilotAgent.list_models()
386
+
387
+ self.assertEqual(opus.context_tiers,
388
+ (("default", "200K"), ("long_context", "1M")))
389
+ self.assertEqual(opus.efforts, ("low", "high"))
390
+ self.assertEqual(haiku.context_tiers, ())
391
+
392
+ def test_a_window_a_little_over_a_million_still_reads_as_1m(self) -> None:
393
+ tiers = _context_tiers([{
394
+ "id": "gpt-6.1-sol",
395
+ "capabilities": {"limits": {"max_context_window_tokens": 1050000}},
396
+ "billing": {"tokenPrices": {"maxPromptTokens": 272000,
397
+ "longContext": {}}}}])
398
+
399
+ self.assertEqual(tiers["gpt-6.1-sol"],
400
+ (("default", "272K"), ("long_context", "1M")))
401
+
402
+ def test_no_context_windows_still_lists_the_models(self) -> None:
403
+ catalog = [AgentModel("claude-opus-5.5", "Claude Opus 5.5")]
404
+
405
+ with patch("codee_agent_github_copilot.provider.acp.fetch_models",
406
+ return_value=catalog), \
407
+ patch("codee_agent_github_copilot.provider._headless_models",
408
+ side_effect=RuntimeError("no answer")):
409
+ self.assertEqual(GitHubCopilotAgent.list_models(), catalog)
410
+
342
411
  def test_an_unavailable_cli_yields_no_models_rather_than_raising(self) -> None:
343
412
  with patch("codee_agent_abstract.acp.subprocess.Popen",
344
413
  side_effect=FileNotFoundError("copilot")):
@@ -71,7 +71,7 @@ class OpenCodeAgent(AbstractCodingAgent):
71
71
 
72
72
  def run(self, user_message: str, session_id: str, model: str = "",
73
73
  on_session_id: Callable[[str], None] | None = None,
74
- effort: str = "") -> str:
74
+ effort: str = "", context_tier: str = "") -> str:
75
75
  return self._run(user_message, model, effort, on_session_id)
76
76
 
77
77
  def continue_conversation(
@@ -81,6 +81,7 @@ class OpenCodeAgent(AbstractCodingAgent):
81
81
  model: str = "",
82
82
  on_session_id: Callable[[str], None] | None = None,
83
83
  effort: str = "",
84
+ context_tier: str = "",
84
85
  ) -> str:
85
86
  return self._run(user_message, model, effort, on_session_id, session_id)
86
87