Mason Daugherty
a2a9a02ecb
style(core): more cleanup all around ( #33711 )
2025-10-28 22:58:19 -04:00
Mason Daugherty
f94108b4bc
fix: links ( #33691 )
...
* X-ref to new docs
* Formatting updates
2025-10-27 19:04:29 -04:00
Marlene
78175fcb96
feat(openai): add callable support for openai_api_key parameter ( #33532 )
2025-10-21 11:16:02 -04:00
Mason Daugherty
241a382fba
docs: fix Anthropic, OpenAI docstrings ( #33566 )
...
minor
2025-10-17 11:18:32 -04:00
Mason Daugherty
1d2273597a
docs: more fixes for refs ( #33554 )
2025-10-16 22:54:16 -04:00
Mason Daugherty
15db024811
chore: more sweeping ( #33533 )
...
more fixes for refs
2025-10-16 15:44:56 -04:00
Jacob Lee
6d73003b17
feat(openai): Populate OpenAI service tier token details ( #32721 )
2025-10-16 15:14:57 -04:00
Mason Daugherty
26e0a00c4c
style: more work for refs ( #33508 )
...
Largely:
- Remove explicit `"Default is x"` since new refs show default inferred
from sig
- Inline code (useful for eventual parsing)
- Fix code block rendering (indentations)
2025-10-15 18:46:55 -04:00
Nuno Campos
0788461abd
feat(openai): Add openai moderation middleware ( #33492 )
2025-10-15 13:59:49 -04:00
Mason Daugherty
291a9fcea1
style: llm -> model ( #33423 )
2025-10-10 13:19:13 -04:00
Mason Daugherty
6fc21afbc9
style: .. code-block:: admonition translations ( #33400 )
...
biiiiiiiiiiiiiiiigggggggg pass
2025-10-09 16:52:58 -04:00
Mason Daugherty
d8a680ee57
style: address Sphinx double-backtick snippet syntax ( #33389 )
2025-10-09 13:35:51 -04:00
Mason Daugherty
3576e690fa
chore: update Sphinx links to markdown ( #33386 )
2025-10-09 11:54:14 -04:00
ccurme
c27271f3ae
fix(openai): update file index key name ( #33350 )
2025-10-09 13:15:27 +00:00
Mason Daugherty
b6132fc23e
style: remove more Optional syntax ( #33371 )
2025-10-08 23:28:43 -04:00
Mason Daugherty
31eeb50ce0
chore: drop UP045 ( #33362 )
...
Python 3.9 EOL
2025-10-08 21:17:53 -04:00
Mason Daugherty
d13823043d
style: monorepo pass for refs ( #33359 )
...
* Delete some double backticks previously used by Sphinx (not done
everywhere yet)
* Fix some code blocks / dropdowns
Ignoring CLI CI for now
2025-10-08 18:41:39 -04:00
Mason Daugherty
6b9b177b89
chore(openai): base.py ref pass ( #33355 )
2025-10-08 16:08:52 -04:00
ccurme
de48e102c4
fix(core,openai,anthropic): delegate to core implementation on invoke when streaming=True ( #33308 )
2025-10-06 15:54:55 -04:00
ccurme
95a451ef2c
fix(openai): disable stream_usage in chat completions if OPENAI_BASE_URL is set ( #33298 )
...
This env var is used internally by the OpenAI client.
2025-10-06 10:14:43 -04:00
ccurme
c8636a626a
chore(openai): (v1) fix sort order of mcp call keys ( #33295 )
2025-10-06 09:29:41 -04:00
ccurme
4e50ec4b98
feat(openai): enable stream_usage when using default base URL and client ( #33205 )
2025-10-06 08:56:38 -04:00
Mason Daugherty
8e7cd85431
style: drop target-version = "py39" for OpenAI, Anthropic, HuggingFace ( #33287 )
2025-10-06 03:29:34 +00:00
Mason Daugherty
ae5b105d11
docs: v1 docs updates ( #33173 )
...
Co-authored-by: Mohammad Mohtashim <45242107+keenborder786@users.noreply.github.com >
Co-authored-by: Caspar Broekhuizen <caspar@langchain.dev >
Co-authored-by: ccurme <chester.curme@gmail.com >
Co-authored-by: Christophe Bornet <cbornet@hotmail.com >
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com >
Co-authored-by: Sadra Barikbin <sadraqazvin1@yahoo.com >
Co-authored-by: Vadym Barda <vadim.barda@gmail.com >
2025-10-02 18:46:26 -04:00
Mason Daugherty
eaa6dcce9e
release: v1.0.0 ( #32567 )
...
Co-authored-by: Mohammad Mohtashim <45242107+keenborder786@users.noreply.github.com >
Co-authored-by: Caspar Broekhuizen <caspar@langchain.dev >
Co-authored-by: ccurme <chester.curme@gmail.com >
Co-authored-by: Christophe Bornet <cbornet@hotmail.com >
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com >
Co-authored-by: Sadra Barikbin <sadraqazvin1@yahoo.com >
Co-authored-by: Vadym Barda <vadim.barda@gmail.com >
2025-10-02 10:49:42 -04:00
ccurme
64141072a3
feat(openai): support openai sdk 2.0 ( #33168 )
2025-09-30 16:34:00 -04:00
Mason Daugherty
986302322f
docs: more standardization ( #33124 )
2025-09-25 20:46:20 -04:00
Mason Daugherty
5bea28393d
docs: standardize .. code-block directive usage ( #33122 )
...
and fix typos
2025-09-25 16:49:56 -04:00
Mason Daugherty
9f6431924f
feat(openai): add max_tokens to AzureChatOpenAI ( #32959 )
...
Fixes #32949
This pattern is [present in
`ChatOpenAI`](https://github.com/langchain-ai/langchain/blob/master/libs/partners/openai/langchain_openai/chat_models/base.py#L2821 )
but wasn't carried over to Azure.
[CI](https://github.com/langchain-ai/langchain/actions/runs/17741751797/job/50417180998 )
2025-09-15 14:09:20 -04:00
Matthew Lapointe
b1f08467cd
feat(core): allow overriding ls_model_name from kwargs ( #32541 )
2025-09-11 16:18:06 -04:00
Aasish
9c7d262ff4
fix(openai): update AzureOpenAIEmbeddings validation logic for openai_api_base ( #31782 )
2025-09-10 14:53:30 -04:00
Mason Daugherty
4c6af2d1b2
fix(openai): structured output ( #32551 )
2025-09-09 11:37:50 -04:00
Sadiq Khan
228fbac3a6
fix(openai): handle AIMessages without response_id in _get_last_messages ( #32824 )
2025-09-08 10:12:50 -04:00
JunHyungKang
6ea06ca972
fix(openai): Fix Azure OpenAI Responses API model field issue ( #32649 )
2025-09-08 10:08:35 -04:00
ccurme
5b0a55ad35
chore(openai): apply formatting changes to AzureChatOpenAI ( #32848 )
2025-09-08 09:54:20 -04:00
Shahroz Ahmad
4828a85ab0
feat(core): add web_search in OpenAI tools list ( #32738 )
2025-09-02 21:57:25 +00:00
Ravirajsingh Sodha
b42dac5fe6
docs: standardize OllamaLLM and BaseOpenAI docstrings ( #32758 )
...
- Add comprehensive docstring following LangChain standards
- Include Setup, Key init args, Instantiate, Invoke, Stream, and Async
sections
- Provide detailed parameter descriptions and code examples
- Fix linting issues for code formatting compliance
Contributes to #24803
---------
Co-authored-by: Mason Daugherty <github@mdrxy.com >
2025-08-31 17:45:56 -05:00
Jacob Lee
1459d4f4ce
fix(openai): Always add raw response object to OpenAI client errors for invoke ( #32655 )
2025-08-26 09:59:25 -04:00
Alex Naidis
21f7a9a9e5
fix(openai): allow temperature parameter for gpt-5-chat models ( #32624 )
2025-08-21 16:40:10 -04:00
sa411022
61bc1bf9cc
fix(openai): construct responses api input ( #32557 )
2025-08-21 15:56:29 -04:00
Shahrukh Shaik
4ba222148d
fix(openai): Chat Message Annotations defaults to [ ] if not list or None ( #32614 )
2025-08-21 15:30:12 -04:00
Mason Daugherty
0024dffa68
feat(openai): officially support verbosity ( #32470 )
2025-08-12 16:00:30 +00:00
Mason Daugherty
c31236264e
chore: formatting across codebase ( #32466 )
2025-08-08 10:20:10 -04:00
Mason Daugherty
00244122bd
feat(openai): minimal and verbosity ( #32455 )
2025-08-08 02:24:21 +00:00
Michael Matloka
5036bd7adb
fix(openai): don't crash get_num_tokens_from_messages on gpt-5 ( #32451 )
2025-08-07 16:33:19 -04:00
ccurme
ec2b34a02d
feat(openai): custom tools ( #32449 )
2025-08-07 16:30:01 -04:00
Mason Daugherty
145d38f7dd
test(openai): add tests for prompt_cache_key parameter and update docs ( #32363 )
...
Introduce tests to validate the behavior and inclusion of the
`prompt_cache_key` parameter in request payloads for the `ChatOpenAI`
model.
2025-08-07 15:29:47 -04:00
ccurme
68c70da33e
fix(openai): add in output_text ( #32450 )
...
This property was deleted in `openai==1.99.2`.
2025-08-07 15:23:56 -04:00
Mason Daugherty
96cbd90cba
fix: formatting issues in docstrings ( #32265 )
...
Ensures proper reStructuredText formatting by adding the required blank
line before closing docstring quotes, which resolves the "Block quote
ends without a blank line; unexpected unindent" warning.
2025-07-27 23:37:47 -04:00
niceg
0d6f915442
fix: LLM mimicking Unicode responses due to forced Unicode conversion of non-ASCII characters. ( #32222 )
...
fix: Fix LLM mimicking Unicode responses due to forced Unicode
conversion of non-ASCII characters.
- **Description:** This PR fixes an issue where the LLM would mimic
Unicode responses due to forced Unicode conversion of non-ASCII
characters in tool calls. The fix involves disabling the `ensure_ascii`
flag in `json.dumps()` when converting tool calls to OpenAI format.
- **Issue:** Fixes ↓↓↓
input:
```json
{'role': 'assistant', 'tool_calls': [{'type': 'function', 'id': 'call_nv9trcehdpihr21zj9po19vq', 'function': {'name': 'create_customer', 'arguments': '{"customer_name": "你好啊集团"}'}}]}
```
output:
```json
{'role': 'assistant', 'tool_calls': [{'type': 'function', 'id': 'call_nv9trcehdpihr21zj9po19vq', 'function': {'name': 'create_customer', 'arguments': '{"customer_name": "\\u4f60\\u597d\\u554a\\u96c6\\u56e2"}'}}]}
```
then:
llm will mimic outputting unicode. Unicode's vast number of symbols can
lengthen LLM responses, leading to slower performance.
<img width="686" height="277" alt="image"
src="https://github.com/user-attachments/assets/28f3b007-3964-4455-bee2-68f86ac1906d "
/>
---------
Co-authored-by: Mason Daugherty <github@mdrxy.com >
Co-authored-by: Mason Daugherty <mason@langchain.dev >
2025-07-24 17:01:31 -04:00