Skip to content

Commit 2aab8ae

Browse files
release: 0.33.0 (#252)
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: Graden Rea <grea@groq.com> Co-authored-by: Graden Rea <gradenr@users.noreply.github.com>
1 parent 1fc7614 commit 2aab8ae

File tree

12 files changed

+149
-24
lines changed

12 files changed

+149
-24
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.32.0"
2+
".": "0.33.0"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 17
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/groqcloud%2Fgroqcloud-626e11caa9a9d011fb76829cd69007eb36ff75d5739cd487ce6ed2a0527037fc.yml
3-
openapi_spec_hash: d7460def3f498d17bb75ab935a2ff2e0
4-
config_hash: 961b4995e909aef11a454befa56ad3d2
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/groqcloud%2Fgroqcloud-498dee72535c9b0585491899c8e5173ac2b83676710c741ef41faef415821683.yml
3+
openapi_spec_hash: aff11e3516f652d05f5416f6593994d1
4+
config_hash: a4a6c3089a2e53425351cc9f42b4b5aa

CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
# Changelog
22

3+
## 0.33.0 (2025-10-21)
4+
5+
Full Changelog: [v0.32.0...v0.33.0](https://github.com/groq/groq-python/compare/v0.32.0...v0.33.0)
6+
7+
### Features
8+
9+
* **api:** api update ([e3ef279](https://github.com/groq/groq-python/commit/e3ef2792b74b312e4242c094071abcfa6d7694a4))
10+
* **api:** api update ([dba73cd](https://github.com/groq/groq-python/commit/dba73cdffede1882bade06dfc84e01c0df984a17))
11+
* **api:** api update ([0008a45](https://github.com/groq/groq-python/commit/0008a452ee15f83d0ac50bb2cff2e7508f5318c1))
12+
* **api:** api update ([b9e85a0](https://github.com/groq/groq-python/commit/b9e85a0362e9597fecad00d42853d38c6ebdd84b))
13+
14+
15+
### Bug Fixes
16+
17+
* bad merge ([1d66042](https://github.com/groq/groq-python/commit/1d6604208a3a0b54f8bc3a32ae24075c7bbc99e8))
18+
* completions overloads ([cf9ad41](https://github.com/groq/groq-python/commit/cf9ad415ec9caa70bb2393c1c31a5de125cbd917))
19+
20+
21+
### Chores
22+
23+
* bump `httpx-aiohttp` version to 0.1.9 ([f366ae8](https://github.com/groq/groq-python/commit/f366ae888a9a3780f1d5ffacee33b984156a8938))
24+
* do not install brew dependencies in ./scripts/bootstrap by default ([77febdb](https://github.com/groq/groq-python/commit/77febdba2cb98a9731912b35510532ba68c64dfe))
25+
* **internal:** detect missing future annotations with ruff ([b25a9a9](https://github.com/groq/groq-python/commit/b25a9a9f4d42dafa9e82a2336d47dbf8a796fac6))
26+
* **types:** change optional parameter type from NotGiven to Omit ([437d52b](https://github.com/groq/groq-python/commit/437d52b779fc03152b45c7d0a652cab3ea551190))
27+
328
## 0.32.0 (2025-09-27)
429

530
Full Changelog: [v0.31.1...v0.32.0](https://github.com/groq/groq-python/compare/v0.31.1...v0.32.0)

pyproject.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "groq"
3-
version = "0.32.0"
3+
version = "0.33.0"
44
description = "The official Python library for the groq API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -39,7 +39,7 @@ Homepage = "https://github.com/groq/groq-python"
3939
Repository = "https://github.com/groq/groq-python"
4040

4141
[project.optional-dependencies]
42-
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]
42+
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"]
4343

4444
[tool.rye]
4545
managed = true
@@ -224,6 +224,8 @@ select = [
224224
"B",
225225
# remove unused imports
226226
"F401",
227+
# check for missing future annotations
228+
"FA102",
227229
# bare except statements
228230
"E722",
229231
# unused arguments
@@ -246,6 +248,8 @@ unfixable = [
246248
"T203",
247249
]
248250

251+
extend-safe-fixes = ["FA102"]
252+
249253
[tool.ruff.lint.flake8-tidy-imports.banned-api]
250254
"functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead"
251255

requirements-dev.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ httpx==0.28.1
5656
# via groq
5757
# via httpx-aiohttp
5858
# via respx
59-
httpx-aiohttp==0.1.8
59+
httpx-aiohttp==0.1.9
6060
# via groq
6161
idna==3.4
6262
# via anyio

requirements.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ httpcore==1.0.9
4343
httpx==0.28.1
4444
# via groq
4545
# via httpx-aiohttp
46-
httpx-aiohttp==0.1.8
46+
httpx-aiohttp==0.1.9
4747
# via groq
4848
idna==3.4
4949
# via anyio

scripts/bootstrap

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,18 @@ set -e
44

55
cd "$(dirname "$0")/.."
66

7-
if ! command -v rye >/dev/null 2>&1 && [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then
7+
if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then
88
brew bundle check >/dev/null 2>&1 || {
9-
echo "==> Installing Homebrew dependencies…"
10-
brew bundle
9+
echo -n "==> Install Homebrew dependencies? (y/N): "
10+
read -r response
11+
case "$response" in
12+
[yY][eE][sS]|[yY])
13+
brew bundle
14+
;;
15+
*)
16+
;;
17+
esac
18+
echo
1119
}
1220
fi
1321

src/groq/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "groq"
4-
__version__ = "0.32.0" # x-release-please-version
4+
__version__ = "0.33.0" # x-release-please-version

src/groq/resources/chat/completions.py

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,9 @@ def create(
7171
"qwen/qwen3-32b",
7272
],
7373
],
74+
citation_options: Optional[Literal["enabled", "disabled"]] | Omit = omit,
7475
compound_custom: Optional[completion_create_params.CompoundCustom] | Omit = omit,
75-
disable_tool_validation: bool | Omit = omit,
76+
disable_tool_validation: Optional[bool] | Omit = omit,
7677
documents: Optional[Iterable[completion_create_params.Document]] | Omit = omit,
7778
exclude_domains: Optional[SequenceNotStr[str]] | Omit = omit,
7879
frequency_penalty: Optional[float] | Omit = omit,
@@ -134,8 +135,9 @@ def create(
134135
"qwen/qwen3-32b",
135136
],
136137
],
138+
citation_options: Optional[Literal["enabled", "disabled"]] | Omit = omit,
137139
compound_custom: Optional[completion_create_params.CompoundCustom] | Omit = omit,
138-
disable_tool_validation: bool | Omit = omit,
140+
disable_tool_validation: Optional[bool] | Omit = omit,
139141
documents: Optional[Iterable[completion_create_params.Document]] | Omit = omit,
140142
exclude_domains: Optional[SequenceNotStr[str]] | Omit = omit,
141143
frequency_penalty: Optional[float] | Omit = omit,
@@ -197,8 +199,9 @@ def create(
197199
"qwen/qwen3-32b",
198200
],
199201
],
202+
citation_options: Optional[Literal["enabled", "disabled"]] | Omit = omit,
200203
compound_custom: Optional[completion_create_params.CompoundCustom] | Omit = omit,
201-
disable_tool_validation: bool | Omit = omit,
204+
disable_tool_validation: Optional[bool] | Omit = omit,
202205
documents: Optional[Iterable[completion_create_params.Document]] | Omit = omit,
203206
exclude_domains: Optional[SequenceNotStr[str]] | Omit = omit,
204207
frequency_penalty: Optional[float] | Omit = omit,
@@ -259,8 +262,9 @@ def create(
259262
"qwen/qwen3-32b",
260263
],
261264
],
265+
citation_options: Optional[Literal["enabled", "disabled"]] | Omit = omit,
262266
compound_custom: Optional[completion_create_params.CompoundCustom] | Omit = omit,
263-
disable_tool_validation: bool | Omit = omit,
267+
disable_tool_validation: Optional[bool] | Omit = omit,
264268
documents: Optional[Iterable[completion_create_params.Document]] | Omit = omit,
265269
exclude_domains: Optional[SequenceNotStr[str]] | Omit = omit,
266270
frequency_penalty: Optional[float] | Omit = omit,
@@ -307,6 +311,10 @@ def create(
307311
model: ID of the model to use. For details on which models are compatible with the Chat
308312
API, see available [models](https://console.groq.com/docs/models)
309313
314+
citation_options: Whether to enable citations in the response. When enabled, the model will
315+
include citations for information retrieved from provided documents or web
316+
searches.
317+
310318
compound_custom: Custom configuration of models and tools for Compound.
311319
312320
disable_tool_validation: If set to true, groq will return called tools without validating that the tool
@@ -459,6 +467,7 @@ def create(
459467
{
460468
"messages": messages,
461469
"model": model,
470+
"citation_options": citation_options,
462471
"compound_custom": compound_custom,
463472
"disable_tool_validation": disable_tool_validation,
464473
"documents": documents,
@@ -545,8 +554,9 @@ async def create(
545554
"qwen/qwen3-32b",
546555
],
547556
],
557+
citation_options: Optional[Literal["enabled", "disabled"]] | Omit = omit,
548558
compound_custom: Optional[completion_create_params.CompoundCustom] | Omit = omit,
549-
disable_tool_validation: bool | Omit = omit,
559+
disable_tool_validation: Optional[bool] | Omit = omit,
550560
documents: Optional[Iterable[completion_create_params.Document]] | Omit = omit,
551561
exclude_domains: Optional[SequenceNotStr[str]] | Omit = omit,
552562
frequency_penalty: Optional[float] | Omit = omit,
@@ -608,8 +618,9 @@ async def create(
608618
"qwen/qwen3-32b",
609619
],
610620
],
621+
citation_options: Optional[Literal["enabled", "disabled"]] | Omit = omit,
611622
compound_custom: Optional[completion_create_params.CompoundCustom] | Omit = omit,
612-
disable_tool_validation: bool | Omit = omit,
623+
disable_tool_validation: Optional[bool] | Omit = omit,
613624
documents: Optional[Iterable[completion_create_params.Document]] | Omit = omit,
614625
exclude_domains: Optional[SequenceNotStr[str]] | Omit = omit,
615626
frequency_penalty: Optional[float] | Omit = omit,
@@ -671,8 +682,9 @@ async def create(
671682
"qwen/qwen3-32b",
672683
],
673684
],
685+
citation_options: Optional[Literal["enabled", "disabled"]] | Omit = omit,
674686
compound_custom: Optional[completion_create_params.CompoundCustom] | Omit = omit,
675-
disable_tool_validation: bool | Omit = omit,
687+
disable_tool_validation: Optional[bool] | Omit = omit,
676688
documents: Optional[Iterable[completion_create_params.Document]] | Omit = omit,
677689
exclude_domains: Optional[SequenceNotStr[str]] | Omit = omit,
678690
frequency_penalty: Optional[float] | Omit = omit,
@@ -733,8 +745,9 @@ async def create(
733745
"qwen/qwen3-32b",
734746
],
735747
],
748+
citation_options: Optional[Literal["enabled", "disabled"]] | Omit = omit,
736749
compound_custom: Optional[completion_create_params.CompoundCustom] | Omit = omit,
737-
disable_tool_validation: bool | Omit = omit,
750+
disable_tool_validation: Optional[bool] | Omit = omit,
738751
documents: Optional[Iterable[completion_create_params.Document]] | Omit = omit,
739752
exclude_domains: Optional[SequenceNotStr[str]] | Omit = omit,
740753
frequency_penalty: Optional[float] | Omit = omit,
@@ -781,6 +794,10 @@ async def create(
781794
model: ID of the model to use. For details on which models are compatible with the Chat
782795
API, see available [models](https://console.groq.com/docs/models)
783796
797+
citation_options: Whether to enable citations in the response. When enabled, the model will
798+
include citations for information retrieved from provided documents or web
799+
searches.
800+
784801
compound_custom: Custom configuration of models and tools for Compound.
785802
786803
disable_tool_validation: If set to true, groq will return called tools without validating that the tool
@@ -933,6 +950,7 @@ async def create(
933950
{
934951
"messages": messages,
935952
"model": model,
953+
"citation_options": citation_options,
936954
"compound_custom": compound_custom,
937955
"disable_tool_validation": disable_tool_validation,
938956
"documents": documents,

src/groq/types/chat/chat_completion_message.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
__all__ = [
1010
"ChatCompletionMessage",
1111
"ExecutedTool",
12+
"ExecutedToolBrowserResult",
1213
"ExecutedToolCodeResult",
1314
"ExecutedToolCodeResultChart",
1415
"ExecutedToolCodeResultChartElement",
@@ -18,6 +19,20 @@
1819
]
1920

2021

22+
class ExecutedToolBrowserResult(BaseModel):
23+
title: str
24+
"""The title of the browser window"""
25+
26+
url: str
27+
"""The URL of the browser window"""
28+
29+
content: Optional[str] = None
30+
"""The content of the browser result"""
31+
32+
live_view_url: Optional[str] = None
33+
"""The live view URL for the browser window"""
34+
35+
2136
class ExecutedToolCodeResultChartElement(BaseModel):
2237
label: str
2338
"""The label for this chart element"""
@@ -141,6 +156,9 @@ class ExecutedTool(BaseModel):
141156
type: str
142157
"""The type of tool that was executed."""
143158

159+
browser_results: Optional[List[ExecutedToolBrowserResult]] = None
160+
"""Array of browser results"""
161+
144162
code_results: Optional[List[ExecutedToolCodeResult]] = None
145163
"""Array of code execution results"""
146164

0 commit comments

Comments
 (0)