BlockWeave Concise
Side-by-side compare
Don't compare $/MTok alone. Compare $ per accepted Python function (and tokens the frontier must read).
Take 30 seconds: same prompts, two columns — quality, completion tokens, and generation $.
Panel summary panel result · n=12
Static Option A scoreboard (P0). Numbers are lab panel results, not list price and not a guarantee on every prompt.
| BlockWeave path strong concise pack |
Flash-class + thin pack default cheap use |
|
|---|---|---|
| Ship @ quality ≥75 | 92% | 92% |
| Mean quality % | 91.4 | 85.3 |
| Mean completion tokens | 86.9 | 648.3 ~7.46× |
| Mean gen $ / prompt (actual) | $0.000035 | $0.000177 ~5.08× |
On this panel, flash-class + thin pack used about 7.46× the completion tokens and about 5.08× the generation $ per prompt vs the BlockWeave strong-pack path — at similar ship rate.
Examples (same prompt both sides)
Example 1 — Write a Python function to expand a user path that may start with ~ and return an absolute pathlib P…
Prompt (same both sides): Write a Python function to expand a user path that may start with ~ and return an absolute pathlib Path object.
BlockWeave path
- Completion tokens: 107
- Gen $ (actual): $0.000045
- Quality %: 95
from pathlib import Path
import os
def expand_user_path(path: str) -> Path:
"""Expand a user path that may start with ~ and return an absolute pathlib Path object."""
return Path(os.path.expanduser(path)).resolve()
Flash-class + thin pack
- Completion tokens: 1500
- Gen $ (actual): $0.000436
- Quality %: 88
Here's a Python function that expands a leading `~` (or `~user`) and returns an absolute `pathlib.Path`:
```python
from pathlib import Path
def expand_user_path(path: str | Path) -> Path:
"""
Expand a user path that may start with ~ and return an absolute Path.
Handles:
- '~/documents' -> /home/username/documents
- '~other/file' -> /home/other/file (if that user exists)
- relative paths -> made absolute against the current working directory
- absolute paths -> returned unchanged (after ~ expansion)
Args:
path: A string or Path object.
Returns:
An absolute pathlib.Path object.
"""
# Convert to Path, expand ~ and ~user
expanded = Path(path).expanduser()
# If still relative, anchor it to the current working directory
if not expanded.is_absolute():
expanded = Path.cwd() / expanded
return expanded
```
**Usage example:**
```python
>>> expand_user_path("~/projects/notes.txt")
PosixPath('/home/alice/projects/notes.txt')
>>> expand_user_path("docs/report.pdf")
PosixPath('/home/alice/current/working/dir/docs/report.pdf')
```
**Notes:**
- `Path.expanduser()` handles both `~` and `~username`.
- The function does **not** resolve symlinks or
Example 2 — Write a Python function to convert a Unix timestamp in seconds to an aware UTC datetime object.
Prompt (same both sides): Write a Python function to convert a Unix timestamp in seconds to an aware UTC datetime object.
BlockWeave path
- Completion tokens: 76
- Gen $ (actual): $0.000028
- Quality %: 95
from datetime import datetime, timezone
def unix_timestamp_to_utc_datetime(timestamp):
"""
Convert a Unix timestamp in seconds to an aware UTC datetime object.
Args:
timestamp (int or float): Unix timestamp in seconds
Returns:
datetime: Aware UTC datetime object
"""
return datetime.fromtimestamp(timestamp, tz=timezone.utc)
Flash-class + thin pack
- Completion tokens: 541
- Gen $ (actual): $0.000167
- Quality %: 95
Here's a Python function that converts a Unix timestamp (in seconds) to an aware UTC `datetime` object:
```python
from datetime import datetime, timezone
def unix_timestamp_to_utc(timestamp: float) -> datetime:
"""
Convert a Unix timestamp (seconds since epoch) to an aware UTC datetime.
Args:
timestamp: Unix timestamp in seconds (int or float).
Returns:
An aware datetime object with UTC timezone.
"""
return datetime.fromtimestamp(timestamp, tz=timezone.utc)
```
### Usage example:
```python
>>> unix_timestamp_to_utc(1700000000)
datetime.datetime(2023, 11, 14, 22, 13, 20, tzinfo=datetime.timezone.utc)
```
### Why this works:
- `datetime.fromtimestamp(timestamp, tz=timezone.utc)` creates a datetime in the specified timezone (UTC) directly.
- The returned object is **aware** because it includes a `tzinfo` set to `timezone.utc`.
- The function accepts both integers and floats; fractional seconds are preserved as microseconds.
If you prefer a more explicit alternative (though slightly less direct), you could use:
```python
def unix_timestamp_to_utc(timestamp: float) -> datetime:
from datetime import datetime, timezone
return datetime.utcfromtimestamp(timestamp).replace(tzinfo=timezone.utc)
```
But the first version is recommended because `utcfromtimestamp()` is considered deprecated in Python 3.12+ and returns a naive datetime that you then have to "attach" timezone info to. The `fromtimestamp(..., tz=...)` approach is cleaner and future-proof.
Example 3 — Write a Python function that ensures a directory exists by creating it and all parent directories if…
Prompt (same both sides): Write a Python function that ensures a directory exists by creating it and all parent directories if needed, then returns the Path object.
BlockWeave path
- Completion tokens: 189
- Gen $ (actual): $0.000068
- Quality %: 92
from pathlib import Path
def ensure_directory_exists(path: str) -> Path:
"""
Ensure a directory exists by creating it and all parent directories if needed.
Args:
path (str): The path to the directory to ensure exists
Returns:
Path: The Path object for the directory
"""
directory_path = Path(path)
directory_path.mkdir(parents=True, exist_ok=True)
return directory_path
Flash-class + thin pack
- Completion tokens: 609
- Gen $ (actual): $0.000174
- Quality %: 95
Below is a Python function that ensures a directory exists, creating it and any missing parent directories as needed, and returns the corresponding `pathlib.Path` object.
```python
from pathlib import Path
def ensure_dir(path):
"""
Ensure a directory exists at the given path, creating it and all
missing parent directories if necessary.
Args:
path (str or Path): The directory path to ensure.
Returns:
Path: The Path object of the ensured directory.
Raises:
FileExistsError: If the path exists but is not a directory.
OSError: If the directory cannot be created (e.g., permission issues).
"""
p = Path(path)
p.mkdir(parents=True, exist_ok=True)
return p
```
### How it works:
- `Path(path)` converts the input to a `pathlib.Path` object.
- `mkdir(parents=True, exist_ok=True)` creates the directory and all intermediate directories.
- `parents=True` ensures parent directories are created as needed.
- `exist_ok=True` prevents an error if the directory already exists.
- The function returns the `Path` object for further use.
### Example usage:
```python
# Create a nested directory structure
dir_path = ensure_dir("data/raw/2024")
print(dir_path) # Output: data/raw/2024
print(dir_path.exists()) # True
print(dir_path.is_dir()) # True
```
### Edge cases:
- If the path already exists as a file, `mkdir` will raise a `FileExistsError` (since `exist_ok=True` only suppresses errors when the path is a directory).
- If the path is empty or `.`, it will ensure the current directory exists (which it always does) and return a `Path('.')`.
This function is safe, concise, and leverages Python's standard library for robust filesystem operations.
Try the product
Model id (planned OpenRouter): blockweave/blockweave-concise
Steady list (M2): $0.15 / $0.60 per MTok (prompt / completion). Win on all-in / $ per job, not sticker alone.
Site: blockweaveconcise.com · API: api.blockweaveconcise.com
Method & fairness
- Panel:
survey_wave2_20260807T145218Z· n=12 D8-style “Write a Python function…” tasks - Us column:
qwen/qwen3-coder-30b-a3b-instruct+ strong packM0_PRODUCT(product concise harness; proxy for BlockWeave path) - Flash column:
deepseek/deepseek-v4-flash-0731+ thin packM0_MARKET - Gen $ = OpenRouter
usage.cost(actual), not marketing blend - Same user prompt both sides; packs differ by design (product vs default thin assistant)
Not a full IDE. Not thr% claims. Not “always cheaper.” Re-run panel when models or packs change; refresh this page from export.