Commit Graph

322 Commits

Author SHA1 Message Date
Alezander9 76569995fd Improve OSS-to-cloud conversion: UTM tracking, better error messages, and cloud nudges
- Add UTM params to all cloud-bound links across README, CLI, and error messages
- Rewrite README Open Source vs Cloud section: position cloud browsers as
  recommended pairing for OSS users, remove separate Use Both section
- Rewrite error messages for use_cloud=True and ChatBrowserUse() to clearly
  state what is wrong and what to do next
- Add missing URLs: invalid API key now links to key page, insufficient
  credits now links to billing page
- Add cloud browser nudge on captcha detection (logger.warning)
- Add cloud browser nudge on local browser launch failure
2026-04-08 22:05:50 -07:00
Laith Weinberger 69c7df060f use just raise to preserve traceback in anthropic fallback 2026-03-25 19:16:50 -04:00
Laith Weinberger 8e8ab73575 fix anthropic action field double-serialization 2026-03-25 19:12:56 -04:00
Laith Weinberger d897ffbd4c fix bedrock structured output w SchemaOptimizer to flatten schema 2026-03-25 15:48:12 -04:00
Mark McDonald c657ba72c3 Merge branch 'main' into fix-gemini-3-temperature 2026-03-25 11:57:43 +08:00
Magnus Müller d4b9e30188 Remove litellm from dependencies (supply chain attack CVE)
litellm versions 1.82.7 and 1.82.8 were backdoored on March 24, 2026
by TeamPCP via a compromised Trivy CI/CD pipeline. browser-use 0.12.3
shipped litellm>=1.82.2 (unpinned) as a core dependency, exposing
~6,900 users to the backdoored versions during the 4-hour window.

This commit:
- Removes litellm entirely from pyproject.toml (core and optional)
- Keeps ChatLiteLLM wrapper intact with a docstring noting
  `pip install litellm` is required separately
- litellm is already lazy-imported inside methods, so users who
  don't use ChatLiteLLM are never affected

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 20:29:44 -07:00
Mark McDonald 90783e69b4 fix: set default temperature to 1.0 for gemini-3 models 2026-03-23 14:13:08 +08:00
STJ 90cb6e8b7d add litellm 2026-03-16 13:30:29 -07:00
Laith Weinberger c9efcb1404 fix vercel gateway: correct extra_body paths, model list, and reasoning_models 2026-03-12 22:22:22 -04:00
AntonVishal 54d9173324 Enhance ChatVercel model support and update API key handling 2026-03-04 15:43:36 +05:30
Chase Xu 993a4c1f5b fix: remove double-counting of reasoning_tokens in OpenAI usage
OpenAI's completion_tokens already includes reasoning_tokens as a subset,
so adding them again was incorrectly inflating token counts by ~2x for
all reasoning models (o1, o3, o4-mini, etc.).

This aligns with other OpenAI-compatible providers (OpenRouter, Vercel,
Cerebras, Groq) which use completion_tokens directly.

Note: This is different from Google Gemini where thinking_tokens ARE
reported separately and need to be added.

Fixes #4065
2026-02-10 05:32:13 -06:00
Laith Weinberger 1629799dd3 fix(openai): structured output call shouldn't depend on schema injection
Fix indentation so structured-output request executes even when add_schema_to_system_prompt is false; add regression tests for choices=null in both structured and non-structured paths.
2026-02-08 16:03:21 -05:00
laithrw d15f0a32c7 Merge branch 'main' into fix/3897-llm-response-parsing 2026-02-08 15:43:05 -05:00
Laith Weinberger 62d19f0c9a fix(openai): handle proxy responses with missing/null choices; undo test change
Avoid indexing response.choices[0] when proxies return choices=null/empty; raise a clear ModelProviderError (with base_url hint) and use the validated first choice for content/finish_reason
2026-02-08 15:37:59 -05:00
Saurav Panda c011c529fc feat: add bu-2-0 pricing 2026-01-27 10:35:41 -08:00
Saurav Panda 6d54f521cf set default gemini thinking to auto 2026-01-26 12:44:51 -08:00
Saurav Panda bb3b1e8cf5 added minimal model for gemini 3 flash 2026-01-23 15:11:13 -08:00
Saurav Panda 041d03a93f feat: updated the thinking budget 2026-01-23 14:42:59 -08:00
Saurav Panda 5b06f4edd9 set default thinking to 0 for gemini-3 models 2026-01-23 13:44:29 -08:00
Saurav Panda f3aad3c145 Added browser use 2-0 support 2026-01-23 13:17:56 -08:00
Saurav Panda 37586c9e9f Added support for new browser use model 2026-01-23 12:39:10 -08:00
sudhanshu112233shukla 4c81648d68 fix(llm): handle missing choices in openai proxy response 2026-01-16 20:21:53 +00:00
Saurav Panda 29c9f1a416 feat: add support for openai responses model 2025-12-22 22:16:56 -08:00
Saurav Panda 221d85744e fix: use correct MIME type for images in Google serializer 2025-12-21 09:45:09 -08:00
Saurav Panda eb2382c7c4 added gemini 3 flash preview model 2025-12-18 11:25:23 -08:00
mertunsall dc0db88215 kv caching for BU agents 2025-12-15 18:23:22 -08:00
mertunsall a58b9307ab BU OSS IS COMING 2025-12-15 14:04:18 -08:00
hacking-racoon 38703d5ad7 perf: lazy import for openai and reportlab to reduce startup latency
- agent/views.py: Move RateLimitError import inside format_error() function
  to avoid loading openai SDK (~800ms) at module level
- llm/messages.py: Replace openai.BaseModel with pydantic.BaseModel directly
  to remove unnecessary openai dependency
- filesystem/file_system.py: Move reportlab imports inside sync_to_disk_sync()
  to avoid ~40ms startup cost when PDF generation is not used
- utils.py: Convert OpenAIBadRequestError and GroqBadRequestError to lazy
  loaders to avoid loading SDKs at module level

This improves import time for users who don't use OpenAI provider,
especially when using Anthropic, Google, or other providers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 01:48:47 +09:00
Saurav Panda 49882fb086 added gemini-3-pro-preview to verified models 2025-12-09 13:38:34 -08:00
Saurav Panda d0e181216e feat: added fallback llm support 2025-12-03 18:53:29 +05:30
Mert Unsal 38b3bb2edd Merge branch 'main' into feature/mistral-support 2025-11-29 14:30:08 -08:00
AntonVishal 5c581c642e Add provider options to ChatVercel for enhanced model routing 2025-11-29 12:27:32 +05:30
MagellaX d58ae80b50 Handle Mistral timeout defaults and fix pixtral mapping 2025-11-28 13:41:36 +05:30
MagellaX 71a1f12037 Format LLM exports after ruff suggestions 2025-11-28 13:32:20 +05:30
MagellaX 93a2bddb9c Fix provider branch ordering in llm models 2025-11-28 13:27:23 +05:30
MagellaX 09a83c97a4 Fix Mistral pyright warnings and schema test 2025-11-28 13:21:19 +05:30
TR-3B 0b82aa7348 Merge branch 'main' into feature/mistral-support 2025-11-28 13:00:24 +05:30
MagellaX 5de9b99567 Add Mistral provider with schema optimizer and presets 2025-11-28 12:56:41 +05:30
Mert Unsal 4d87e49e1f Merge branch 'main' into mert/structured_output 2025-11-25 13:43:55 -08:00
mertunsall 1c9a87b98f Fix more 2025-11-25 13:33:28 -08:00
mertunsall ed7cfa4ab2 fix title problem in schema as well as enum problems 2025-11-25 13:02:39 -08:00
mertunsall 84be050ed7 exponential retries improved 2025-11-25 11:18:03 -08:00
Mert Unsal fd665e01cd Merge branch 'main' into add-vercel-ai-gateway 2025-11-24 11:24:28 -08:00
Pyry Takala 5a3d340ec4 fix: add type ignores for pyright in cache tests
Content blocks are dictionaries at runtime despite type annotations
indicating Pydantic models. Added type: ignore comments to allow
dictionary-style .get() access which works correctly at runtime.
2025-11-21 01:12:56 +00:00
Pyry Takala 3787380829 fix: apply cache_control only to last block in Anthropic messages
Previously, cache_control was applied to every content block and tool call
in a message, which could exceed Anthropic's limit of 4 cache breakpoints
per request. This fix ensures cache_control is only applied to the last
block in each message type:
- Last text block in UserMessage/AssistantMessage content
- Last tool_use block when AssistantMessage has tool calls
- Only the last overall block when AssistantMessage has both content and tools

This prevents exceeding the cache breakpoint limit while maintaining
correct caching behavior.
2025-11-21 01:04:12 +00:00
Saurav Panda 0263f05a7e Merge branch 'main' into fix/openai-reasoning-model-keyerror 2025-11-19 21:48:46 -08:00
Magnus Müller 1f6d606fac Linter 2025-11-15 10:11:55 -08:00
Magnus Müller 51ba3422c3 disable telemetry logs for chatbrowseruse 2025-11-15 10:11:08 -08:00
LarsenCundric d251105e64 Add http_client to Anthropic Chat 2025-11-12 17:58:38 -08:00
Yangong cc2e4d800c fix: fix link in llm's readme 2025-11-12 11:46:23 +00:00