MCPcopy Create free account
hub / github.com/idank/explainshell / __init__

Method __init__

explainshell/extraction/llm/providers/codex.py:24–40  ·  view source on GitHub ↗
(
        self,
        model: str,
        *,
        reasoning_effort: str | None = None,
        codex_bin: str | Sequence[str] = "codex",
    )

Source from the content-addressed store, hash-verified

22 """
23
24 def __init__(
25 self,
26 model: str,
27 *,
28 reasoning_effort: str | None = None,
29 codex_bin: str | Sequence[str] = "codex",
30 ) -> None:
31 # model format: "codex/<model>" (effort is passed separately)
32 parts = model.split("/", 1)
33 if len(parts) < 2 or not parts[1]:
34 raise ValueError(
35 f"codex provider requires a model name (e.g. codex/gpt-5.4-mini), got: {model!r}"
36 )
37 self._model = model
38 self._underlying = parts[1]
39 self._reasoning_effort = reasoning_effort
40 self._codex_bin = [codex_bin] if isinstance(codex_bin, str) else list(codex_bin)
41
42 def call(self, user_content: str) -> tuple[str, TokenUsage]:
43 prompt = SYSTEM_PROMPT + "\n\n" + user_content

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected