CtrlK
BlogDocsLog inGet started
Tessl Logo

jbaruch/spring-boot-4

Build Spring Boot 4.0 applications - project setup, REST controllers, dependency injection, configuration, actuator, and testing

91

1.79x
Quality

90%

Does it follow best practices?

Impact

97%

1.79x

Average score across 3 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

task.mdevals/scenario-2/

Configure and Test an AI Inference Gateway Service

Problem/Feature Description

Your team is building an AI inference gateway that routes requests to various language model providers. The service has several tuneable parameters (model name, timeout, max tokens, retry count, and API base URL) that differ across development, staging, and production environments. The team wants these parameters managed via structured, type-safe configuration that can be validated at startup and shared cleanly across the codebase without passing raw @Value strings everywhere.

The service also needs JSON responses to be human-readable in development (pretty-printed) and compact in production, and it must export distributed traces so the platform team can observe latency across provider calls. Finally, the team wants integration tests that spin up the full application context and use MockMvc to verify controller behavior — with certain downstream provider clients mocked out.

Provide the full implementation: build descriptor, application configuration files for at least two profiles (dev and prod), the typed configuration class, a sample controller that reads from the configuration, and at least one integration test class.

Output Specification

Produce the following files:

  • Build file (pom.xml or build.gradle.kts) with all required dependencies
  • application.properties (base/common settings)
  • application-dev.properties (dev profile overrides, e.g., pretty-print JSON, verbose logging)
  • application-prod.properties (production profile settings)
  • InferenceProperties.java — a type-safe configuration class bound to the inference prefix for inference settings (provider URL, model name, max tokens, timeout, retry count) with sensible defaults
  • InferenceController.java — a REST controller with at least a GET /api/inference/config endpoint that returns the current configuration
  • InferenceControllerTest.java — an integration test class that verifies the controller behavior with downstream dependencies mocked out

The code should compile cleanly and reflect current Spring Boot 4 conventions.

evals

tile.json