Bring your own Model SPCS Pricing
Use this reference whenever Bring your own Model/SPCS model cost appears in model selection, optimization, evaluation, Pareto filtering, or post-deployment review.
Core Rule
Bring your own Model services are hosted on Snowpark Container Services (SPCS), so do not price them with Cortex-hosted model token rates from src/models.json. Bring your own Model cost is based on SPCS compute consumption for the model service's compute pool and service runtime.
For Bring your own Model candidates, estimate cost from measured service throughput plus the SPCS credit rate for the service compute pool instance family.
Inputs To Collect
- Fully qualified AI function name or direct
AI_COMPLETE('<service_name>', ...)call path. - Bring your own Model service/model identifier used in
AI_COMPLETE. - Compute pool name and instance family for the SPCS service.
- Service min/max instances and currently running instance count, if available.
- Representative sample table and input columns.
- Approximate output-token length or measured output text length.
- SPCS credit rate per hour for the compute pool instance family.
Credit Rate Source
Do not invent SPCS credit rates. Use one of these sources, in order:
- Account usage history for the actual service/compute pool when enough recent data exists. Query
SNOWFLAKE.ACCOUNT_USAGE.SNOWPARK_CONTAINER_SERVICES_HISTORYor service/notebook container runtime history views to find recentCREDITSby hour for the target service or compute pool. - Snowflake consumption table / pricing calculator for the instance family when usage history is not available yet. Use Glean or official Snowflake docs to locate the current consumption table, then cite the exact instance family and credit/hour rate in the user-facing estimate.
- Ask the user/admin for the approved internal credit/hour rate if neither usage history nor a current consumption table is available.
If no credible credit/hour rate is available, present throughput metrics and say cost cannot be converted to credits yet.
Measurement Procedure
After the Bring your own Model function/service is created and callable, run a small benchmark before presenting Bring your own Model cost:
- Select about 20 representative samples from the user's eval/test/training table.
- Run the function or
AI_COMPLETEservice call on those samples. - Measure wall-clock time from immediately before the first call to after the final result returns.
- Record:
sample_count- elapsed seconds
- requests per second:
rps = sample_count / elapsed_seconds - approximate input tokens
- approximate output tokens
- approximate total tokens processed
- Estimate throughput:
tokens_per_second = total_tokens_processed / elapsed_secondstokens_per_hour = tokens_per_second * 3600
- Add 5 minutes of warm-up overhead to the cost estimate:
billable_hours = (elapsed_seconds + 300) / 3600for one-shot benchmark cost- For steady-state per-hour estimates, present warm-up separately as
5 minutes × credit_rate_per_hour.
- Convert to credits:
benchmark_credits = credit_rate_per_hour * running_instance_count * billable_hourscredits_per_1k_requests = benchmark_credits / sample_count * 1000credits_per_1M_tokens = credit_rate_per_hour * running_instance_count / (tokens_per_hour / 1_000_000)
If service autoscaling is enabled and running instances vary, use the measured or expected average running instance count. If unknown, estimate with min_instances and clearly label it as conservative/approximate.
Token Estimation
Use exact token counts if available from logs or model metadata. If not available, use an approximation and label it:
input_tokens ≈ input_characters / 4output_tokens ≈ output_characters / 4
Do not claim token counts are exact unless they were measured by the service/model.
User-Facing Output
Present Bring your own Model cost as measured/estimated SPCS compute economics, not Cortex token pricing:
- Service/model name
- Compute pool and instance family
- Credit/hour source used
- Sample count and elapsed time
- RPS
- Estimated tokens/hour
- 5-minute warm-up credit overhead
- Estimated credits per 1K requests and/or per 1M tokens
- Caveats: warm-up, autoscaling, batch size, input/output length, and whether token counts are approximate
Use wording like:
Bring your own Model is hosted on SPCS, so the cost estimate is based on measured throughput and the compute pool's credit/hour rate, not Cortex model token pricing.
Pareto / Optimize Integration
When comparing Bring your own Model against Cortex-hosted models:
- Keep Cortex-hosted model costs from
src/models.json. - Replace Bring your own Model
src/models.jsontoken-cost assumptions with measured SPCS throughput economics from this reference. - If Bring your own Model throughput has not been measured yet, mark Bring your own Model cost as
needs measurementand do not rank it as cheaper/more expensive solely from token list prices. - Always include the current Bring your own Model candidate in the optimization result comparison if the function uses Bring your own Model, unless the user explicitly excluded it.