Skip to content

Commit 3a5b1b3

Browse files
committed
update: move header to x-interfaze-*, bumo ver to 1.0.3
1 parent c5afe36 commit 3a5b1b3

7 files changed

Lines changed: 20 additions & 20 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ Set router, cache, and streaming behavior once on the client:
304304
```python
305305
interfaze = Interfaze(
306306
show_additional_info=True, # stream <precontext> deltas as they're produced
307-
bypass_moe=True, # skip the mixture-of-experts router
307+
bypass_moa=True, # skip the mixture-of-architecture router
308308
bypass_cache=True, # skip the semantic cache
309309
)
310310
```

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "interfaze"
7-
version = "1.0.2"
7+
version = "1.0.3"
88
description = "Interfaze Python SDK."
99
readme = "README.md"
1010
requires-python = ">=3.9"

src/interfaze/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
TaskName,
3636
)
3737

38-
__version__ = "1.0.2"
38+
__version__ = "1.0.3"
3939

4040
__all__ = [
4141
"Interfaze",

src/interfaze/_client.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
DEFAULT_TIMEOUT,
1111
HEADER_ADMIN_KEY,
1212
HEADER_BYPASS_CACHE,
13-
HEADER_BYPASS_MOE,
13+
HEADER_BYPASS_MOA,
1414
HEADER_SHOW_ADDITIONAL_INFO,
1515
INTERFAZE_BASE_URL,
1616
)
@@ -30,15 +30,15 @@ def _resolve_key(api_key: Optional[str]) -> str:
3030
def _build_headers(
3131
default_headers: Optional[Dict[str, str]],
3232
show_additional_info: bool,
33-
bypass_moe: bool,
33+
bypass_moa: bool,
3434
bypass_cache: bool,
3535
admin_key: Optional[str],
3636
) -> Dict[str, str]:
3737
headers: Dict[str, str] = dict(default_headers or {})
3838
if show_additional_info:
3939
headers[HEADER_SHOW_ADDITIONAL_INFO] = "true"
40-
if bypass_moe:
41-
headers[HEADER_BYPASS_MOE] = "true"
40+
if bypass_moa:
41+
headers[HEADER_BYPASS_MOA] = "true"
4242
if bypass_cache:
4343
headers[HEADER_BYPASS_CACHE] = "true"
4444
if admin_key:
@@ -53,7 +53,7 @@ def __init__(
5353
api_key: Optional[str] = None,
5454
base_url: Optional[str] = None,
5555
show_additional_info: bool = False,
56-
bypass_moe: bool = False,
56+
bypass_moa: bool = False,
5757
bypass_cache: bool = False,
5858
admin_key: Optional[str] = None,
5959
default_headers: Optional[Dict[str, str]] = None,
@@ -64,7 +64,7 @@ def __init__(
6464
api_key=_resolve_key(api_key),
6565
base_url=base_url or INTERFAZE_BASE_URL,
6666
default_headers=_build_headers(
67-
default_headers, show_additional_info, bypass_moe, bypass_cache, admin_key
67+
default_headers, show_additional_info, bypass_moa, bypass_cache, admin_key
6868
),
6969
**kwargs,
7070
)
@@ -80,7 +80,7 @@ def __init__(
8080
api_key: Optional[str] = None,
8181
base_url: Optional[str] = None,
8282
show_additional_info: bool = False,
83-
bypass_moe: bool = False,
83+
bypass_moa: bool = False,
8484
bypass_cache: bool = False,
8585
admin_key: Optional[str] = None,
8686
default_headers: Optional[Dict[str, str]] = None,
@@ -91,7 +91,7 @@ def __init__(
9191
api_key=_resolve_key(api_key),
9292
base_url=base_url or INTERFAZE_BASE_URL,
9393
default_headers=_build_headers(
94-
default_headers, show_additional_info, bypass_moe, bypass_cache, admin_key
94+
default_headers, show_additional_info, bypass_moa, bypass_cache, admin_key
9595
),
9696
**kwargs,
9797
)

src/interfaze/_constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@
4343

4444
# Interfaze control-plane headers.
4545
HEADER_SHOW_ADDITIONAL_INFO = "x-show-additional-info"
46-
HEADER_BYPASS_MOE = "x-bypass-moe"
47-
HEADER_BYPASS_CACHE = "x-bypass-cache"
46+
HEADER_BYPASS_MOA = "x-interfaze-bypass-moa"
47+
HEADER_BYPASS_CACHE = "x-interfaze-bypass-cache"
4848
HEADER_ADMIN_KEY = "x-admin-key"

tests/test_chat.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def test_control_headers():
115115
messages=[{"role": "user", "content": "x"}]
116116
)
117117
h = last_headers(route)
118-
assert h["x-show-additional-info"] == "true" and h["x-bypass-cache"] == "true"
118+
assert h["x-show-additional-info"] == "true" and h["x-interfaze-bypass-cache"] == "true"
119119

120120

121121
@respx.mock
@@ -124,14 +124,14 @@ def test_all_control_headers_present():
124124
Interfaze(
125125
api_key="t",
126126
show_additional_info=True,
127-
bypass_moe=True,
127+
bypass_moa=True,
128128
bypass_cache=True,
129129
admin_key="admin-secret",
130130
).chat.completions.create(messages=[{"role": "user", "content": "x"}])
131131
h = last_headers(route)
132132
assert h["x-show-additional-info"] == "true"
133-
assert h["x-bypass-moe"] == "true"
134-
assert h["x-bypass-cache"] == "true"
133+
assert h["x-interfaze-bypass-moa"] == "true"
134+
assert h["x-interfaze-bypass-cache"] == "true"
135135
assert h["x-admin-key"] == "admin-secret"
136136

137137

@@ -141,8 +141,8 @@ def test_default_headers_omit_control_flags_when_unset():
141141
Interfaze(api_key="t").chat.completions.create(messages=[{"role": "user", "content": "x"}])
142142
h = last_headers(route)
143143
assert "x-show-additional-info" not in h
144-
assert "x-bypass-moe" not in h
145-
assert "x-bypass-cache" not in h
144+
assert "x-interfaze-bypass-moa" not in h
145+
assert "x-interfaze-bypass-cache" not in h
146146
assert "x-admin-key" not in h
147147

148148

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)