Skip to content

Commit c394989

Browse files
feat(api): add IP address logging for residential and custom proxies
1 parent 8b6d801 commit c394989

File tree

7 files changed

+18
-6
lines changed

7 files changed

+18
-6
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 90
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-6a44c851ec955b997558a8524eb641355ff3097474f40772b8ea2fef5bee4134.yml
3-
openapi_spec_hash: 155ee005a1b43e1c11e843de91e9f509
4-
config_hash: 6cbbf855a29bc675f35ddb1106ea9083
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fkernel-cc60c65c6bb0b8a8ea662cf758806e641790870ded35f6ffdb9f4801f3d29b15.yml
3+
openapi_spec_hash: a1074e1bba578bcd5912512166ada0dc
4+
config_hash: 7868d3397406c2974b6f058488aeefd6

src/kernel/_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
]
6868

6969
ENVIRONMENTS: Dict[str, str] = {
70-
"production": "https://api.onkernel.com/",
70+
"production": "https://api.kernel.com/",
7171
"development": "https://localhost:3001/",
7272
}
7373

src/kernel/types/proxy_check_response.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ class ProxyCheckResponse(BaseModel):
182182
config: Optional[Config] = None
183183
"""Configuration specific to the selected proxy `type`."""
184184

185+
ip_address: Optional[str] = None
186+
"""IP address that the proxy uses when making requests."""
187+
185188
last_checked: Optional[datetime] = None
186189
"""Timestamp of the last health check performed on this proxy."""
187190

src/kernel/types/proxy_create_response.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ class ProxyCreateResponse(BaseModel):
182182
config: Optional[Config] = None
183183
"""Configuration specific to the selected proxy `type`."""
184184

185+
ip_address: Optional[str] = None
186+
"""IP address that the proxy uses when making requests."""
187+
185188
last_checked: Optional[datetime] = None
186189
"""Timestamp of the last health check performed on this proxy."""
187190

src/kernel/types/proxy_list_response.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ class ProxyListResponseItem(BaseModel):
183183
config: Optional[ProxyListResponseItemConfig] = None
184184
"""Configuration specific to the selected proxy `type`."""
185185

186+
ip_address: Optional[str] = None
187+
"""IP address that the proxy uses when making requests."""
188+
186189
last_checked: Optional[datetime] = None
187190
"""Timestamp of the last health check performed on this proxy."""
188191

src/kernel/types/proxy_retrieve_response.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,9 @@ class ProxyRetrieveResponse(BaseModel):
182182
config: Optional[Config] = None
183183
"""Configuration specific to the selected proxy `type`."""
184184

185+
ip_address: Optional[str] = None
186+
"""IP address that the proxy uses when making requests."""
187+
185188
last_checked: Optional[datetime] = None
186189
"""Timestamp of the last health check performed on this proxy."""
187190

tests/test_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ def test_base_url_env(self) -> None:
695695
Kernel(api_key=api_key, _strict_response_validation=True, environment="production")
696696

697697
client = Kernel(base_url=None, api_key=api_key, _strict_response_validation=True, environment="production")
698-
assert str(client.base_url).startswith("https://api.onkernel.com/")
698+
assert str(client.base_url).startswith("https://api.kernel.com/")
699699

700700
client.close()
701701

@@ -1598,7 +1598,7 @@ async def test_base_url_env(self) -> None:
15981598
client = AsyncKernel(
15991599
base_url=None, api_key=api_key, _strict_response_validation=True, environment="production"
16001600
)
1601-
assert str(client.base_url).startswith("https://api.onkernel.com/")
1601+
assert str(client.base_url).startswith("https://api.kernel.com/")
16021602

16031603
await client.close()
16041604

0 commit comments

Comments
 (0)