Skip to content

Project generation model settings — Reference

Terse reference for the per-project model ids used by generation paths. For implementation details see the deep dive; for the web flow see the experience guide.

Route

Method & pathBodyReturnsNotes
PUT /api/projects/{id}/provider-settingsUpdateProjectProviderSettingsRequest204 No ContentUpdates default provider/model fields and the three generation model fields. Owner-only.

Source: apps/Agentweaver.Api/Endpoints/ProjectEndpoints.cs:258.

Request fields

UpdateProjectProviderSettingsRequest is defined in apps/Agentweaver.Api/Contracts/Dtos.cs:582; the web type mirrors it at apps/web/src/api/types.ts:241.

FieldTypeMeaning
default_providerstring | nullExisting default provider field.
default_model_github_copilotstring | nullExisting default GitHub Copilot run model.
default_model_microsoft_foundrystring | nullExisting default Foundry run model.
blueprint_generation_modelstring | nullModel id for blueprint JSON generation. Null inherits the configured blueprint generation default.
workflow_generation_modelstring | nullModel id for generated workflow fallback. Null inherits the configured workflow generation default.
outcome_spec_generation_modelstring | nullModel id for coordinator outcome-spec drafting. Null inherits the configured outcome-spec generation default.

Project response fields

ProjectResponse includes the same three generation model fields (apps/Agentweaver.Api/Contracts/Dtos.cs:605), and apps/web/src/api/types.ts:183 exposes them on Project.

Persistence

FieldDatabase columnSource
ProjectRecord.BlueprintGenerationModelblueprint_generation_modelProjectRecord.cs:26; MemoryDbContext.cs:227
ProjectRecord.WorkflowGenerationModelworkflow_generation_modelProjectRecord.cs:27; MemoryDbContext.cs:228
ProjectRecord.OutcomeSpecGenerationModeloutcome_spec_generation_modelProjectRecord.cs:28; MemoryDbContext.cs:229

Postgres migration: apps/Agentweaver.Api.Migrations.Postgres/Migrations/20260708040300_AddProjectGenerationModelSettings.cs.

Validation and status codes

CodeWhen
204 No ContentSettings were saved.
400 Bad RequestProject id is invalid, a model id fails IsAllowedModelId (the check uses a permissive ^(gpt|claude|o) prefix regex — no hardcoded allowlist), or service validation throws ArgumentException.
403 ForbiddenCaller does not own the project.
404 Not FoundProject does not exist or update found no row.

Source: apps/Agentweaver.Api/Endpoints/ProjectEndpoints.cs:263, :270, :274, :293.

Consumers

SettingConsumerSource
blueprint_generation_modelPOST /api/blueprints/generate resolves it with GenerationModelOptions.ResolveBlueprintModel before BlueprintService.GenerateAsync.BlueprintEndpoints.cs:58
workflow_generation_modelBlueprintService.GenerateAsync places it in WorkflowGenerationRequest.GenerationModel for IWorkflowGenerator fallback.BlueprintService.cs:554
outcome_spec_generation_modelCoordinatorRunService.ActivateAsync resolves it and passes it to CoordinatorDraftInput.CoordinatorRunService.cs:247

Provider failure surface

Blueprint generation returns classified provider errors when the configured model or provider cannot be used. AgentProviderException maps Copilot auth, rate-limit, model-list, unavailable-model, runtime, and transient failures to machine-readable codes (packages/Agentweaver.AgentRuntime/Providers/AgentProviderException.cs:41). BlueprintService.ProviderFailureResult stores those as ErrorCode and FailureMessage, and BlueprintEndpoints returns JSON with error, message, details, and options (BlueprintService.cs:625; BlueprintEndpoints.cs:63).

See also