mohamed-ashraf-elsaed/claude-agent-sdk-laravel
api_base_url config key (ANTHROPIC_BASE_URL env var) — override the default Anthropic API endpointauth_token config key (ANTHROPIC_AUTH_TOKEN env var) — override the auth token for custom providersProcessTransport now forwards ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN to the CLI subprocesssrc/Data/ModelUsage.php) — typed value object for per-model token usage, cost, and cache metrics
totalInputTokens() — sum of input + cache read + cache creation tokenscacheHitRate() — ratio of cache-read tokens to total input (0.0–1.0)maxBudgetUsd option and config key (CLAUDE_AGENT_MAX_BUDGET_USD)maxThinkingTokens option and config key (CLAUDE_AGENT_MAX_THINKING_TOKENS)fallbackModel() option for automatic model fallback (--fallback-model)betas() option to enable beta features (--beta)ResultMessage and QueryResult:
parsedModelUsage() — per-model usage as typed ModelUsage objectscacheReadTokens() — total cache-read tokens across all modelscacheCreationTokens() — total cache-creation tokens across all modelsClaudeAgentOptions:
continueConversation() — fluent setter for --continuesettings(string $path) — fluent setter for --settingsaddDir(string $path) — fluent setter for --add-dir (supports multiple calls)user(string $userId) — fluent setter for --userextraArg(string $flag, ?string $value) — fluent setter for arbitrary CLI flagsenableFileCheckpointing(bool) — fluent setter for --enable-file-checkpointingincludePartialMessages(bool) — fluent setter for --include-partial-messageshook(HookEvent, HookMatcher) — register hooks for any eventpreToolUse(string $command, ?string $matcher, ?int $timeout) — shorthand for pre-tool-use hookspostToolUse(string $command, ?string $matcher, ?int $timeout) — shorthand for post-tool-use hooksmaxBudgetUsd(float) — set max budget per querymaxThinkingTokens(int) — set max thinking tokensfallbackModel(string) — set fallback modelbetas(array) — enable beta featuresHookMatcher::command(string $command, ?string $matcher, ?int $timeout) — create from shell commandHookMatcher::phpScript(string $scriptPath, ?string $matcher, ?int $timeout) — create from PHP script pathtoArray() and JsonSerializable support for CLI serialization--hooks CLI argument as JSONResultMessage::parse() now accepts camelCase modelUsage key alongside model_usagemax_budget_usd, max_thinking_tokensClaudeAgentManager merges maxBudgetUsd and maxThinkingTokens from config defaultsHookMatcher constructor — $hooks parameter changed from callable[] to string[] (shell commands). The CLI executes hook commands as subprocesses, not PHP callables.ProcessTransport::buildCommand() now automatically includes --verbose flagProcessTransport::run() now throws ProcessException when the CLI exits with a non-zero code and no result messages are foundProcessTransport::run() now throws JsonParseException when JSON-looking output lines fail to parseProcessTransport::stream() improved error handling — throws CliNotFoundException or ProcessException on failure when no messages were yieldedparseLine() and looksLikeJson() private helpers in ProcessTransport for cleaner codeProcessTransport streaming no longer silently swallows all non-zero exit codes — it now distinguishes between normal completion with results and actual failuresHow can I help you explore Laravel packages today?