302 Commits

Author SHA1 Message Date
Laith Weinberger e552b6de34 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:31:42 -05: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
Yangong 84549433c9 fix: fix link in llm's readme 2025-11-12 11:40:58 +00:00
kalil0321 ff1db95889 Merge branch 'main' into add-vercel-ai-gateway 2025-11-07 01:33:46 +01:00
mertunsall 67d2f12665 default to PNG everywhere 2025-11-06 14:51:52 -08:00
Magnus Müller 3cf6e1046b include kimi-2 2025-11-06 13:49:20 -08:00
karamvirsingh1998 4330164f95 fix: prevent KeyError crash in OpenAI reasoning models
Fix KeyError that occurs when using OpenAI reasoning models (o1, o3, etc.)
with temperature=None or frequency_penalty=None.

The code was using 'del' to remove keys that may not exist in model_params
dictionary. Changed to use .pop() with default value for safe key removal.

Fixes crash scenario:
- ChatOpenAI(model='o1-mini', temperature=None) -> KeyError

Changes:
- Replace 'del model_params[key]' with 'model_params.pop(key, None)'
- Ensures parameters are safely removed even if not present in dict
2025-11-06 12:04:25 +05:30
Matt Greathouse 38d102c90d Merge branch 'main' into fix-gemini-schema 2025-11-02 07:39:10 -05:00
Matt Greathouse 663299629d Merge branch 'main' into fix-gemini-schema 2025-11-01 19:23:49 -04:00
Alezander9 bf15d159da address cubic comments and clean up new example 2025-11-01 15:37:38 -07:00
Alezander9 f1b0473645 Merge remote-tracking branch 'upstream/main' into library-judge 2025-11-01 15:25:55 -07:00
Alezander9 4396b416da pass along a new param request_type when using ChatBrowserUse to flag special handling for judge 2025-11-01 15:25:24 -07:00
mertunsall 61779863bc option to not force structured output 2025-11-01 14:20:26 -07:00
Krishna Rathore 687f166a29 Updated openai logging 2025-11-01 22:33:35 +05:30
matt-greathouse d3f60a76fe Remove stripping of required fields from gemini optimized schema 2025-10-31 15:54:51 -04:00
kalil0321 381291500e Merge branch 'main' into add-vercel-ai-gateway 2025-10-31 14:51:55 +01:00
Magnus Müller f54d0929b1 Merge branch 'main' into feature/3263-add-extra-body-support 2025-10-30 23:35:51 -07:00
kalil0321 b0c123abed fix cubic comment 2025-10-31 02:18:03 +01:00
kalil0321 e1f9369d3c Merge branch 'main' into add-vercel-ai-gateway 2025-10-31 02:00:47 +01:00
kalil0321 bf32987344 Merge branch 'main' into add-vercel-ai-gateway 2025-10-30 18:18:38 +01:00
Krishna Rathore 7e477ea159 Add extra_body parameter support in openrouter 2025-10-30 20:10:37 +05:30
Magnus Müller af649d357a Retry 503 errors 2025-10-29 23:04:58 -07:00