MCPcopy Create free account

hub / github.com/canarybyte/veridrop / functions

Functions825 in github.com/canarybyte/veridrop

Functiontest_long_context_skips_tier_above_model_limit
gpt-4o-mini has 128k context — the 200k tier must be skipped, not failed. Otherwise a non-fraudulent OpenAI key would always show false-positive
tests/test_long_context.py:431
Functiontest_long_context_skips_when_not_opted_in
()
tests/test_long_context.py:291
Functiontest_long_context_standard_tiers_unchanged
Default standard mode (only include_long_context=True) keeps hardcoded (32k, 100k, 200k) tiers — backward compatibility for everyone who liked
tests/test_long_context.py:508
Functiontest_looks_rate_limited_catches_known_patterns
()
tests/test_long_context.py:719
Functiontest_lookup_model_alias
()
tests/test_active_detectors.py:28
Functiontest_lookup_model_dot_hyphen_tolerance
()
tests/test_active_detectors.py:71
Functiontest_lookup_model_opus_4_8_registered
opus-4-8 必须在册且 thinking 支持开启,否则 thinking_signature 会对最新模型静默跳过(皇冠级检测失灵)。自适应思维,同 4-7。
tests/test_active_detectors.py:36
Functiontest_lookup_model_snapshot
()
tests/test_active_detectors.py:49
Functiontest_lookup_model_unknown_returns_none
()
tests/test_active_detectors.py:55
Functiontest_make_needles_deterministic_per_seed
()
tests/test_long_context.py:35
Functiontest_make_needles_differ_per_seed
()
tests/test_long_context.py:41
Functiontest_make_needles_returns_three_distinct_answers
()
tests/test_long_context.py:26
Functiontest_message_id_clean_response_scores_100
()
tests/test_passive_detectors.py:118
Functiontest_message_id_non_claude_model_caught
()
tests/test_passive_detectors.py:139
Functiontest_message_id_skip_when_no_observations
()
tests/test_passive_detectors.py:159
Functiontest_message_id_tool_use_prefix_violation
()
tests/test_passive_detectors.py:148
Functiontest_message_id_uuid_id_is_caught
The exact issue we saw on router.8864k.com: id is a UUID, not msg_*.
tests/test_passive_detectors.py:127
Functiontest_message_id_violations_collapse_across_observations
()
tests/test_passive_detectors.py:165
Functiontest_messages_create_keeps_temperature_for_haiku
Models without a deprecation rule keep their temperature.
tests/test_client.py:129
Functiontest_messages_create_raises_on_4xx
()
tests/test_client.py:214
Functiontest_messages_create_returns_dict_unchanged
()
tests/test_client.py:157
Functiontest_messages_create_strips_temperature_for_opus_4_7
Opus 4.7 rejects `temperature` (deprecated). Client must strip it.
tests/test_client.py:29
Functiontest_messages_create_strips_temperature_for_opus_4_8
Opus 4.8 rejects `temperature` (deprecated). Client must strip it.
tests/test_client.py:61
Functiontest_model_choices_contains_supported_aliases_and_no_deprecated
()
tests/test_gemini_phase3.py:272
Functiontest_model_context_limit_known_models
Values verified against official docs 2026-05-05 — see _MODEL_CONTEXT_LIMITS docstring for sources. Update both the table and this test togeth
tests/test_long_context.py:150
Functiontest_model_context_limit_snapshot_suffix
()
tests/test_long_context.py:175
Functiontest_model_context_limit_unknown_falls_back_conservatively
()
tests/test_long_context.py:183
Functiontest_models_match_bidirectional_prefix
()
tests/test_active_detectors.py:59
Functiontest_models_match_dot_hyphen_tolerance
()
tests/test_active_detectors.py:83
Functiontest_models_match_handles_snapshot_and_models_prefix
()
tests/test_gemini_phase3.py:282
Functiontest_needles_at_distinct_positions
()
tests/test_long_context.py:47
Functiontest_normalize_base_url_accepts_trailing_v1
()
tests/test_client.py:21
Functiontest_normalize_gemini_base_url_adds_v1_for_host_roots
()
tests/test_gemini_phase3.py:250
Functiontest_normalize_gemini_base_url_preserves_explicit_prefixes
()
tests/test_gemini_phase3.py:238
Functiontest_openai_base_url_normalization_handles_v1_suffix
()
tests/test_openai_phase2.py:158
Functiontest_openai_basic_request_tolerates_reasoning_budget_exhaustion
()
tests/test_openai_phase2.py:273
Functiontest_openai_client_keeps_temperature_for_other_models
()
tests/test_openai_phase2.py:197
Functiontest_openai_client_strips_temperature_for_default_only_models
()
tests/test_openai_phase2.py:168
Functiontest_openai_default_model_choices_are_gpt5_series
()
tests/test_openai_phase2.py:236
Functiontest_openai_detectors_use_core_base_classes
()
tests/test_openai_phase2.py:224
Functiontest_openai_integrity_accepts_lower_stream_completion_tokens
()
tests/test_openai_phase2.py:307
Functiontest_openai_pick_default_falls_back_to_first
()
tests/test_probe.py:431
Functiontest_openai_pick_default_prefers_gpt_4o_mini
()
tests/test_probe.py:425
Functiontest_openai_protocol_detector_accepts_chat_completion_shape
()
tests/test_openai_phase2.py:247
Functiontest_openai_standard_runner_completes_with_fake_client
()
tests/test_openai_phase2.py:258
Functiontest_openai_tier_banner_disclaims_authenticity
()
tests/test_openai_phase2.py:230
Functiontest_openai_token_billing_accepts_lower_stream_completion_tokens
()
tests/test_openai_phase2.py:280
Functiontest_parse_numbered_answers_handles_various_formats
()
tests/test_active_detectors.py:139
Functiontest_parse_numbered_answers_ignores_out_of_range
()
tests/test_active_detectors.py:156
Functiontest_pdf_test_document_is_well_formed
The bundled test PDF must load, look like a PDF, and be non-trivial. We can't grep for MAGIC in raw bytes — reportlab encodes content streams
tests/test_active_detectors.py:350
Functiontest_probe_401_signals_auth_failure
Auth fail is the ONE upstream error the UI should treat as blocking (red pill) — every other failure path is graceful.
tests/test_probe.py:278
Functiontest_probe_404_means_endpoint_unsupported_not_failure
Common on private relays. Frontend renders this as neutral, NOT red, and submission stays enabled.
tests/test_probe.py:264
Functiontest_probe_404_response_includes_best_by_protocol_nulls
Even when /models is 404 the response shape must include the new field so the frontend doesn't NPE on data.best_by_protocol[protocol].
tests/test_probe.py:413
Functiontest_probe_500_returns_structured_error
(monkeypatch)
tests/test_probe.py:290
Functiontest_probe_best_falls_back_to_first_when_no_preference_matches
A relay that only carries non-preferred SKUs should still get a suggestion (first available) — strictly better UX than null.
tests/test_probe.py:372
Functiontest_probe_best_handles_snapshot_suffixes
When the relay only lists snapshots (e.g. gpt-4o-mini-2024-07-18), pick_default_model should still match via prefix and pick that snapshot.
tests/test_probe.py:398
Functiontest_probe_best_is_null_for_empty_protocol_buckets
(monkeypatch)
tests/test_probe.py:386
Functiontest_probe_cache_isolated_by_api_key
(monkeypatch)
tests/test_probe.py:326
Functiontest_probe_caches_subsequent_calls_for_same_key
Don't re-hit the relay if the user just blurs/re-blurs api_key.
tests/test_probe.py:309
Functiontest_probe_happy_path_classifies_all_buckets
(monkeypatch)
tests/test_probe.py:122
Functiontest_probe_model_alive_openai_returns_true_on_2xx
Smoke: a model that responds 200 to a 4-token chat call is alive.
tests/test_probe.py:510
Functiontest_probe_model_alive_returns_false_with_upstream_body_on_4xx
A 4xx (model_not_found) must surface the upstream body so the user sees the real reason, not just a generic exception.
tests/test_probe.py:528
Functiontest_probe_model_alive_unknown_protocol_fails_gracefully
()
tests/test_probe.py:547
Functiontest_probe_non_json_response_handled
(monkeypatch)
tests/test_probe.py:300
Functiontest_probe_official_anthropic_models_includes_required_version
(monkeypatch)
tests/test_probe.py:165
Functiontest_probe_picks_protocol_preferred_default
best_by_protocol should follow each protocol's pick_default_model ordering, not just the relay's natural sort. For OpenAI that means gpt-4o-mi
tests/test_probe.py:348
Functiontest_probe_root_base_url_falls_back_to_v1_models
Providers like B.AI document a host root but only allow /v1/models.
tests/test_probe.py:195
Functiontest_probe_root_base_url_falls_back_when_models_returns_non_json
Some relays serve an HTML landing page at /models but JSON at /v1/models.
tests/test_probe.py:233
Functiontest_probe_sorts_each_protocol_bucket_by_preference
The dropdown shows the relay's actual whitelist; preferred (cheap + stable) models must come first so users default-select toward the healthy
tests/test_probe.py:481
Functiontest_protocol_clean_response_scores_100
()
tests/test_passive_detectors.py:41
Functiontest_protocol_clean_with_no_response_headers_still_passes
We deliberately do not penalize missing anthropic-request-id — the official Anthropic API doesn't return it either (empirically verified).
tests/test_passive_detectors.py:50
Functiontest_protocol_invalid_stop_reason_caught
()
tests/test_passive_detectors.py:72
Functiontest_protocol_negative_input_tokens_caught
()
tests/test_passive_detectors.py:90
Functiontest_protocol_repeated_issue_only_counted_once
()
tests/test_passive_detectors.py:104
Functiontest_protocol_skip_when_no_observations
()
tests/test_passive_detectors.py:98
Functiontest_protocol_unknown_content_block_type_caught
()
tests/test_passive_detectors.py:80
Functiontest_protocol_uuid_id_is_not_a_protocol_issue
UUID-form id is technically a non-empty string, so ProtocolDetector should not flag it. (MessageIDDetector handles prefix conventions.)
tests/test_passive_detectors.py:61
Functiontest_protocols_constant_matches_buckets_in_response
()
tests/test_probe.py:340
Functiontest_ranking_score_formula
Sanity check the formula: prior_value=50, prior_weight=5.
tests/test_leaderboard_ranking.py:61
Functiontest_ranking_score_no_samples_returns_prior
Empty relay returns 50 (neutral prior) — sort doesn't crash on it.
tests/test_leaderboard_ranking.py:78
Functiontest_responses_api_template_accepts_official_shape
()
tests/test_openai_protocol_templates.py:75
Functiontest_responses_api_template_flags_bad_function_call_arguments
()
tests/test_openai_protocol_templates.py:118
Functiontest_responses_api_template_rejects_claude_message_shape
()
tests/test_openai_protocol_templates.py:84
Functiontest_responses_api_template_validates_function_call_arguments
()
tests/test_openai_protocol_templates.py:102
Functiontest_sanitize_body_tolerates_dotted_opus_4_7
Users frequently type `claude-opus-4.7` (dotted) in the web form. The deprecation strip must still kick in — otherwise temperature leaks throu
tests/test_client.py:93
Functiontest_sanitize_openai_headers_keeps_diagnostics_only
()
tests/test_openai_baseline.py:127
Functiontest_separate_ips_have_separate_buckets
()
tests/test_ratelimit.py:35
Functiontest_sse_parser_handles_full_stream
Replicate a minimal Anthropic-like SSE stream and verify event parsing.
tests/test_client.py:457
Functiontest_structured_output_tool_def_is_well_formed
()
tests/test_active_detectors.py:371
Functiontest_summary_text_buckets
()
tests/test_scorer.py:70
Functiontest_thinking_adaptive_opus_47_and_48_use_xhigh_effort
()
tests/test_active_detectors.py:326
Functiontest_thinking_applies_to_supported_models
()
tests/test_active_detectors.py:243
Functiontest_thinking_extended_models_do_not_send_output_config
()
tests/test_active_detectors.py:337
Functiontest_thinking_skip_unknown_model
()
tests/test_active_detectors.py:296
Functiontest_throttled_accumulates_usage_from_non_stream
ThrottledClient.total_usage absorbs usage from each non-stream response.
tests/test_client.py:307
Functiontest_throttled_accumulates_usage_from_stream
ThrottledClient absorbs message_start input + message_delta output (cumulative final value) across a streamed response.
tests/test_client.py:412
Functiontest_throttled_broadcasts_synthetic_final_response_for_stream
Bug B fix: passive detectors must observe streaming requests too. ThrottledClient builds a final response dict from message_start + message_de
tests/test_client.py:342
Functiontest_throttled_broadcasts_to_passive_detectors
()
tests/test_client.py:269
Functiontest_throttled_retries_on_429_with_backoff
First call returns 429, second returns 200. ThrottledClient must retry.
tests/test_client.py:228
Functiontest_tier_banner_signals_protocol_level_and_mentions_openai_compat
()
tests/test_gemini_phase3.py:266
← previousnext →701–800 of 825, ranked by callers